[PATCH] D13992: [AliasAnalysis] Take into account readonly attribute for the function arguments

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 17:35:40 PDT 2015


hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.

LGTM.

In follow-up, it would be nice to handle the ReadNone attribute also.


================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:619
@@ -618,1 +618,3 @@
 
+  if (CS.paramHasAttr(ArgIdx + 1, Attribute::ReadOnly))
+    return MRI_Ref;
----------------
Indeed, not sure what I was thinking; thanks for the test case.


http://reviews.llvm.org/D13992





More information about the llvm-commits mailing list