[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
Wed Sep 23 00:32:27 PDT 2026


================
@@ -5963,24 +5963,40 @@ bool InstCombinerImpl::run() {
 class AliasScopeTracker {
   SmallPtrSet<const MDNode *, 8> UsedAliasScopesAndLists;
   SmallPtrSet<const MDNode *, 8> UsedNoAliasScopesAndLists;
+  // The domains with disjoint scopes of which more than one scope is used by
+  // !alias.scope, along with the first such scope seen for each domain.
+  SmallDenseMap<const MDNode *, const MDNode *, 4> FirstScopeInDisjointDomain;
+  SmallPtrSet<const MDNode *, 4> UsedDisjointDomains;
----------------
brunodf-gf wrote:

Maybe the following is more precise:
Instead of tracking the used disjoint-scope domains, I think you can track those _scopes_ that belong to a disjoint-scope domain, and that always appear in the !alias.scope list whenever a scope from that disjoint-scope domain is used. It seems to me such scopes are dead (since they are never implicitly on the !noalias list).

https://github.com/llvm/llvm-project/pull/218768


More information about the llvm-commits mailing list