[PATCH] D16225: [BasicAliasAnalysis] Take into account operand bundles in the getModRefInfo function

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 13:40:31 PST 2016


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:720
@@ -719,3 +719,2 @@
     bool PassedAsArg = false;
     unsigned ArgNo = 0;
-    for (ImmutableCallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end();
----------------
For clarity, it would be good to rename ArgNo to OperandNo since it can now iterate into the bundle operands not just the argument operands.  

Alternatively, we could replace the induction variable with the CI-CS.data_operands_begin() like we did in CaptureTracking.

Doing this bit of cleanup in a separate change is fine.

================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:734
@@ -733,3 +733,3 @@
       // escape.
       AliasResult AR =
           getBestAAResults().alias(MemoryLocation(*CI), MemoryLocation(Object));
----------------
A potential enhancement to this code would be to return MRI_Ref if the arguments which could alias the object are all readonly.  This would be potentially useful for deopt bundles since all the arguments are implicitly read only.  

If you decide to do this, it should definitely be a separate patch.  


Repository:
  rL LLVM

http://reviews.llvm.org/D16225





More information about the llvm-commits mailing list