[PATCH] D115873: [LAA] Add remarks for  unbounded array access
    Sander de Smalen via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb  3 00:42:11 PST 2022
    
    
  
sdesmalen added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2078
   if (!CanDoRTIfNeeded) {
-    recordAnalysis("CantIdentifyArrayBounds") << "cannot identify array bounds";
+    if (auto *I = dyn_cast_or_null<Instruction>(UncomputablePtr)) {
+      recordAnalysis("CantIdentifyArrayBounds", I)
----------------
Before this change, recordAnalysis was called unconditionally, but now it is only called if UncomputablePtr is set. I don't think that's intentional, so you can instead just do this:
  auto *I = dyn_cast_or_null<Instruction>(UncomputablePtr);
  recordAnalysis("CantIdentifyArrayBounds", I) << "cannot identify array bounds";
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2108
       auto *SE = PSE->getSE();
-      CanDoRTIfNeeded = Accesses.canCheckPtrAtRT(*PtrRtChecking, SE, TheLoop,
-                                                 SymbolicStrides, true);
+      Value *UncomputablePtr2;
+      CanDoRTIfNeeded = Accesses.canCheckPtrAtRT(
----------------
nit: s/UncomputablePtr2/UncomputablePtrUnused/
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115873/new/
https://reviews.llvm.org/D115873
    
    
More information about the llvm-commits
mailing list