[PATCH] D58770: [LSR] Attempt to increase the accuracy of LSR's setup cost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 00:05:26 PST 2019


samparker added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:1224
+    return getSetupCost(S->getStart());
+  if (!EnableRecursiveSetupCost)
+    return 0;
----------------
dmgreen wrote:
> samparker wrote:
> > Shouldn't we have this before the first recursive call?
> It's was trying to replicate the behaviour from before this patch, so allowing the recursion into the addrec. EnableRecursiveSetupCost may not have been the best name for that exactly. I'll update the code to match the name better.
Fair enough, then maybe we should still check for a constant start for the AddRec even when recursion isn't enabled?


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

https://reviews.llvm.org/D58770





More information about the llvm-commits mailing list