[LLVMdev] Optimization for size
eli.friedman at gmail.com
Mon Oct 17 08:29:29 PDT 2011
On Mon, Oct 17, 2011 at 7:58 AM, James Molloy <james.molloy at arm.com> wrote:
> Looking at bugzilla PR11087, I’d like to conditionalise a transformation in
> ARMIselLowering.cpp based on whether we’re compiling for codesize or
> -Os doesn’t actually exist for llc, and I can’t see an obvious place where
> that condition would be set. Where do we specify if we’re optimizing for
> codesize or performance?
You can key off off of the optsize attribute
(http://llvm.org/docs/LangRef.html#fnattrs); how exactly you access
that depends on where you are in the compiler.
More information about the llvm-dev