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
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 transformationin> 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
Reasonably Related Threads
- [LLVMdev] Optimization for size
- [LLVMdev] ARM64 -> AArch64 merge status
- [LLVMdev] RFC: Codifying (but not formalizing) the optimization levels in LLVM and Clang
- [LLVMdev] between r241513 and r241594, clang 3.7.0svn now crashes building clang-tools-extra
- load instruction erroneously removed by GVN