[PATCH] D25557: [LAA] Collect pointers with unknown bounds

Ashutosh Nema via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 00:19:14 PDT 2016


ashutosh.nema added inline comments.


================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:478
+  void pointerWithUnknownBounds(Value *Ptr) {
+    assert(Ptr);
+    PtrsWithUnknownBounds.push_back(Ptr);
----------------
Its good to assert with some message (i.e. unexpected null pointer).


================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:718
 
-  bool CanDoRTIfNeeded = !NeedRTCheck || CanDoRT;
-  if (!CanDoRTIfNeeded)
-    RtCheck.reset();
-  return CanDoRTIfNeeded;
+  return !NeedRTCheck || CanDoRT;
 }
----------------
Earlier when “NeedRTCheck” is true & LAA can’t find the bounds of pointer it used to reset the “Need” field of RuntimePointerChecking, but with this change it can remains set. Is this expected change ?


https://reviews.llvm.org/D25557





More information about the llvm-commits mailing list