[clang] [llvm] [mlir] [polly] [IR] Add alias scope domains with disjoint scopes (PR #218768)
Bruno De Fraine via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 15:53:17 PDT 2026
================
@@ -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
More information about the llvm-commits
mailing list