[PATCH] D38569: Expose must/may alias info in MemorySSA.
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 19:04:49 PDT 2017
dberlin added a comment.
I'd reuse the type we already have to express alias results.
While you don't care about partial alias, it makes all code have the same meaning for the same thing :)
================
Comment at: include/llvm/Analysis/MemorySSA.h:258
+ bool definingAccessMayAlias() const { return !isMustAlias; }
+
----------------
Why not just have definingAliasType() and use the AliasResult type here?
Then this looks like any other aliasing code.
================
Comment at: include/llvm/Analysis/MemorySSA.h:277
- void setDefiningAccess(MemoryAccess *DMA, bool Optimized = false) {
+ void setDefiningToMayAlias() { isMustAlias = false; }
+
----------------
IMHO, setDefiningAliasType(AliasResult)
================
Comment at: include/llvm/Analysis/MemorySSA.h:281
+
+ void setDefiningAccess(MemoryAccess *DMA, bool Optimized = false,
+ bool IsMustAlias = false) {
----------------
Take an AliasResult AliasType = MayAlias)
================
Comment at: lib/Analysis/MemorySSA.cpp:241
+ bool IsClobber;
+ bool IsMustAlias;
+};
----------------
Just use AliasResult for the second part here.
(I'd suggest using ModRefType for the first but i believe nothing wants it right now)
https://reviews.llvm.org/D38569
More information about the llvm-commits
mailing list