[PATCH] D55373: [LSR] Generate formulae to enable more post-incs

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 04:49:44 PST 2018


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:3802
+  // the pointer for itself in the next iteration.
+  if (TTI.shouldFavorCrossIterationPostInc() && LU.Kind == LSRUse::Address) {
+    if (auto *GAddRec = dyn_cast<SCEVAddRecExpr>(G)) {
----------------
gilr wrote:
> The new TTI API relates to the same HW feature, right? Why not use a cl::opt in LSR to turn this optimization off?
When I've got the next patch ready, I will re-run my tests and see if this is viable. It may not be good for all targets, and if so, I think a target hook would be more useful.


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

https://reviews.llvm.org/D55373





More information about the llvm-commits mailing list