[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

Eli Friedman eli.friedman at gmail.com
Sat Feb 25 18:12:33 PST 2012


2012/2/25 Rafael Espíndola <rafael.espindola at gmail.com>:
>> 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.
>
> Why did you had to change both llvm and clang? Why not just stop
> emitting the hints in clang?

Because the inliner itself was emitting the hints...

-Eli




More information about the llvm-commits mailing list