[LLVMdev] Optimization for size

James Molloy james.molloy at arm.com
Mon Oct 17 08:30:13 PDT 2011


Thanks Eli and Richard.

Exactly what I needed to know.

James

-----Original Message-----
From: Eli Friedman [mailto:eli.friedman at gmail.com] 
Sent: 17 October 2011 16:29
To: James Molloy
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Optimization for size

On Mon, Oct 17, 2011 at 7:58 AM, James Molloy <james.molloy at arm.com> wrote:
> Hi,
>
>
>
> 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 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.

-Eli








More information about the llvm-dev mailing list