[LLVMdev] Optimization for size

Renato Golin rengolin at systemcall.org
Tue Oct 18 07:37:12 PDT 2011


On 17 October 2011 15:58, James Molloy <james.molloy at arm.com> wrote:
> -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?

The pass manager builder has an option for Os (0, 1, 2). But all it
does, AFAICR, is to disable one explosive optimization pass.

I'm not sure how that gets propagated into the DAG. Maybe every
function in that module receives the attribute Richard mentions...

Optimization for size hasn't been tested properly, at least not for
ARM, and I hit all sorts of trouble (even before getting to DAG) when
enabling it.

-- 
cheers,
--renato

http://systemcall.org/




More information about the llvm-dev mailing list