[llvm-commits] [llvm] r151429 - in /llvm/trunk: include/llvm/Transforms/IPO.h include/llvm/Transforms/IPO/InlinerPass.h include/llvm/Transforms/Utils/Cloning.h lib/Transforms/IPO/InlineAlways.cpp lib/Transforms/IPO/InlineSimple.cpp lib/Transforms/IPO/Inliner.cpp lib/Transforms/Utils/InlineFunction.cpp
Chad Rosier
mcrosier at apple.com
Sat Feb 25 10:46:04 PST 2012
On Feb 24, 2012, at 11:22 PM, Duncan Sands wrote:
> Hi Chad,
>
>> Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These
>> are optimization hints, but at -O0 we're not optimizing. This becomes a problem
>> when the alwaysinline attribute is abused.
>> rdar://10921594
>
> can you please explain some more for those of us who can't access rdar. Why is
> it a problem, and what alwaysinline abuse do you have in mind?
At -O0 the AlwaysInliner pass is run to honor the always_inline attribute. By default the @llvm.lifetime_start and @llvm.lifetime_end intrinsics were being emitted. These are compiler hints and at -O0 they're never used and thus should not be emitted. The particular test case I came across was compiling in 283s at -O0 (fast, huh). Now it compiles in 1.35s at -O0. By abuse I mean the developer thinks they're smarted then the compiler, so they mark everything with the always_inline attribute. I'm not saying this is a common problem, but regardless these intrinsics are useless at -O0.
> You also forgot to add a testcase.
Yes, you're right. I will add one soon. Thanks for keeping me honest, Duncan.
Chad
>
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list