[PATCH] D46193: [LSR] Skip LSR if the cost of input is cheaper than LSR's solution

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 14:00:11 PDT 2018


sebpop added a comment.

I tried this patch on exynos-m3 and there are several benchmarks improving by about 5%.
Among those benchmarks are spec2000 188.ammp and 256.bzip2 that improve by 3%.
All performance degradations are within noise level.



================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:3488
+bool LSRInstance::FormInputGEPFormula(Value *Op, LSRUse &LU, Formula &F) {
+  assert(IU.getIVsUsedBy(Op) && "Expect at least on IV operand in GEP");
+  GEPOperator *GEP = cast<GEPOperator>(Op);
----------------
s/on/one/


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:3505
+
+  // Note that this loop is inspired by SE.getGEPExptr().
+  for (auto Index = GEP->idx_begin(); Index != GEP->idx_end(); ++Index) {
----------------
s/getGEPExptr/getGEPExpr/


https://reviews.llvm.org/D46193





More information about the llvm-commits mailing list