[LLVMdev] Optimization for size
richard at xmos.com
Mon Oct 17 08:28:35 PDT 2011
On 17/10/11 15:58, James Molloy wrote:
> Looking at bugzilla PR11087, I’d like to conditionalise a
> transformation in ARMIselLowering.cpp based on whether we’re compiling
> for codesize or performance.
> -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 specify a function should be optimized for size with the optsize
function attribute. Given a MachineFunction you can check for this using:
bool OptSize = MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize);
Richard Osborne | XMOS
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev