[PATCH] D70228: [LoopDataPrefetch + SystemZ] Let target decide on prefetching on a per loop basis

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 03:20:06 PST 2019


jonpa marked 2 inline comments as done.
jonpa added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp:232
+  /// The prefetched instruction (for debug output)
+  Instruction* MemI;
+  Prefetch(const SCEVAddRecExpr *lscev, Instruction *i) :
----------------
The Prefetch struct MemI member is used solely for debug/ORE output. It is currently not guarded by '#ifndef NDEBUG', but maybe it should be, even though it's just one pointer? The debug output could perhaps be improved also, I merely tried to keep what there was while also printing the new values gathered. The MemI member is not needed for anything else, so if we could change the debug output instead perhaps it's not even needed, or?


================
Comment at: llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp:250
+        if (DomBB != PrefBB)
+          InsertPt = DomBB->getTerminator();
+      }
----------------
I am trusting DT->findNearestCommonDominator() and DomBB->getTerminator() to do this, but I am not 100% sure that there is always a terminator in each block...?



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70228/new/

https://reviews.llvm.org/D70228





More information about the llvm-commits mailing list