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

Jingyue Wu jingyue at google.com
Tue Mar 10 21:10:58 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.
----------------
hfinkel wrote:
> I don't understand this loop, could you please add a comment explaining it. What changes between the two iterations, and why two?
Let me know whether this comment helps. 

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

http://reviews.llvm.org/D7459

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






More information about the llvm-commits mailing list