[polly] [llvm] [AST] Don't merge memory locations in AliasSetTracker (PR #65731)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 07:31:33 PST 2023


================
@@ -307,7 +173,7 @@ class AliasSetTracker {
   BatchAAResults &AA;
   ilist<AliasSet> AliasSets;
 
-  using PointerMapType = DenseMap<AssertingVH<Value>, AliasSet::PointerRec *>;
+  using PointerMapType = DenseMap<MemoryLocation, AliasSet *>;
----------------
nikic wrote:

I'm confused. Yes, AA treats undef as noalias, but as far as I know AST specifically wants the undefs to be part of the same set, or at least that is how I interpret the comment at https://github.com/llvm/llvm-project/blob/5f254eb05566f5b400a212ae77117a9efd9019a1/llvm/lib/Analysis/AliasSetTracker.cpp#L346-L350. It seems like you are going out of your way to have undefs in different sets -- why?

More generally I would expect that all MemLocs that have the same pointer will end up in the same alias set, even if AA reports them as NoAlias (as implied by metadata or undef). After all they are *also* MustAlias, and treating them as such makes things a lot simpler.

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


More information about the llvm-commits mailing list