[PATCH] D14364: Fix LoopAccessAnalysis when potentially nullptr check are involved

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 21:19:31 PST 2015


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

LGTM with the comments.  Thanks for the fix!


================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:748-750
@@ -746,1 +747,5 @@
+            // in their UnderlyingObjects list.
+            if (isa<ConstantPointerNull>(UnderlyingObj)) {
+              continue;
+            }
             UnderlyingObjToAccessMap::iterator Prev =
----------------
No {}

================
Comment at: test/Analysis/LoopAccessAnalysis/nullptr.ll:1
@@ +1,2 @@
+;RUN: opt -loop-accesses -analyze %s  | FileCheck %s
+; CHECK: Memory dependences are safe with run-time checks
----------------
space after ;

Also a sentence of what this is trying to test would be useful.


http://reviews.llvm.org/D14364





More information about the llvm-commits mailing list