[PATCH] D15912: [BasicAA/MDA] Sink aliasing rules for malloc and calloc into BasicAA

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 14:14:29 PST 2016


reames added inline comments.

================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:744
@@ -731,1 +743,3 @@
+  }
+
   // While the assume intrinsic is marked as arbitrarily writing so that
----------------
dberlin wrote:
> What happens to alloca here?
Nothing, it's not a call site.  

I think what you're getting at is whether we need alloca handling in MDA.  The flow there is unchanged.  The mustalias (early def) case is exactly the same and Alloca's don't modify memory so we explicitly skip over them.  The previous code would have either early continued or hit the NoModRef case inside getModRefInfo(Instruction*, MemLoc); in either case, we skip the alloca.

Actually, that points out the isa<AllocaInst> check I added in MDA is completely redundant.  I'll; remove that. 


http://reviews.llvm.org/D15912





More information about the llvm-commits mailing list