[PATCH] [SLSR] handle candidate form &B[i * S]

hfinkel at anl.gov hfinkel at anl.gov
Tue Mar 10 16:29:36 PDT 2015


================
Comment at: lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:358
@@ +357,3 @@
+    const SCEV *Base = SE->getMinusSCEV(GEPExpr, LocalOffset);
+    for (unsigned Stripped = 0; Stripped < 2; ++Stripped) {
+      // At least, Idx = Idx *s 1.
----------------
I don't understand this loop, could you please add a comment explaining it. What changes between the two iterations, and why two?

================
Comment at: lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:490
@@ -245,1 +489,3 @@
 
+  if (TargetTransformInfoWrapperPass *TTIP =
+          getAnalysisIfAvailable<TargetTransformInfoWrapperPass>()) {
----------------
I think we always at least have the base implementation available. Just make TTI a hard dependency.

http://reviews.llvm.org/D7459

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list