[llvm-commits] [llvm] r113439 - in /llvm/trunk: lib/Transforms/Scalar/LoopUnrollPass.cpp test/Transforms/LoopUnroll/call.ll
Chris Lattner
clattner at apple.com
Wed Sep 8 16:19:34 PDT 2010
On Sep 8, 2010, at 4:10 PM, Owen Anderson wrote:
> Author: resistor
> Date: Wed Sep 8 18:10:07 2010
> New Revision: 113439
>
> URL: http://llvm.org/viewvc/llvm-project?rev=113439&view=rev
> Log:
> Relax the "don't unroll loops containing calls" rule. Instead, when a loop contains a call, lower the
> unrolling threshold to the optimize-for-size threshold. Basically, for loops containing calls, unrolling
> can still be profitable as long as the loop is REALLY small.
This doesn't seem like the right approach: loop unroll should use the same code size estimator as the inliner. It just treats calls as having a large code size. As long as the estimator says that the loop body (minus any expected shrinkage) is under the threshold, whether it has a call or not shouldn't matter.
-Chris
More information about the llvm-commits
mailing list