================
@@ -1156,6 +1156,20 @@ void llvm::cloneNoAliasScopes(ArrayRef<MDNode *> 
NoAliasDeclScopes,
                               StringRef Ext, LLVMContext &Context) {
   MDBuilder MDB(Context);
 
+  // A cloned scope has to go into a clone of its domain if that domain has
+  // disjoint scopes: the copies of a duplicated access are in the same memory
+  // region, so they must not become implicitly noalias with each other.
+  DenseMap<const MDNode *, MDNode *> ClonedDomains;
+  auto GetClonedDomain = [&](const MDNode *Domain) {
----------------
brunodf-gf wrote:

This is just personal taste, but I don't see a reason to introduce a lambda 
here, you can just directly place the logic above the single position where you 
invoke the lambda (but the map has to stay outside the loop or course). But 
feel free to ignore this remark.

https://github.com/llvm/llvm-project/pull/218768
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to