[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
================
@@ -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:
Hm, I think there may be room for improvement in the way you detect "used" disjoint-scope domains here.
Suppose that you have one instruction with an !alias.scope list with several scopes from a disjoint-scope domain. I think you will color that domain as used then (because you have seen multiple scopes for it). But it is not really used until you encounter another instruction with an !alias.scope that uses some scopes from that same domain, but not the exact same set? (Because only in that case there is a potential NoAlias conclusion between instructions using that domain.)
https://github.com/llvm/llvm-project/pull/218768
More information about the llvm-commits
mailing list