[LLVMdev] [cfe-dev] RFC: Codifying (but not formalizing) the optimization levels in LLVM and Clang

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Jan 14 14:21:30 PST 2013

On 1/14/2013 3:23 PM, Chandler Carruth wrote:
> This is a great question. My plan would be: inlining doesn't impact the
> attributes. The inliner will be free to look at both the caller and the
> callee's attributes to choose the best inlining decision.

The problem is not so much with the inlining decisions, as much as it is 
with keeping the attributes in the inlined code.  If you have a function 
foo, which is to be compiled at O2, and it's called from bar, whose 
optimization level is O3, then you can take the O2 code and insert it in 
the middle of the O3 code.  The problem is that in certain cases, 
compiling at O3 is not acceptable, so we can't just "upgrade" the opt 
level from O2 to O3.


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation

More information about the llvm-dev mailing list