[PATCH] Add straight-line strength reduction to LLVM

Mark Heffernan meheff at google.com
Mon Feb 2 16:27:05 PST 2015


Comment at: lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:166
@@ +165,3 @@
+      C.Basis = &(*Basis);
+      break;
+    }
Since there can be more than one candidate would there ever be any advantage to looking deeper in the list?  Some bases could be cheaper (eg, where i' - i == 1 and you don't need a multiply).  However, I'd guess in the common unrolled case the latest candidate on the list is best.  On the other hand though, from an ILP perspective the earliest candidate might be best.



More information about the llvm-commits mailing list