[llvm-commits] [llvm] r95454 - in /llvm/trunk: lib/Transforms/Scalar/LoopUnrollPass.cpp test/CodeGen/X86/nancvt.ll

Duncan Sands baldrick at free.fr
Fri Feb 5 16:50:22 PST 2010


Hi Jakob,

>>>>> Don't unroll loops containing function calls.
>>>> what is the reasoning behind this?
>>> A function call is likely to take a significant amount of time, so the relative gain from unrolling the loop is very small. The code size increase is still there, though.
>> is this based on experimental results?
> 
> I wish, but no.
> 
> We have seen some cases (almabench) where loop unrolling could prevent inlining because the calling function became too big, and the inliner backed off. In these cases it is better to have deep inlining in a loop than having the loop unrolled without inlining.
> 
> If you have examples of bad regressions caused by this, I would like to know.

the loops I would like to be unrolled weren't unrolled before your change
either, so I guess I'm not going to see any regressions due to this :)

Ciao,

Duncan.



More information about the llvm-commits mailing list