[llvm-commits] [PATCH] Add an attribute for Oz related optimizations

Quentin Colombet qcolombet at apple.com
Fri Oct 19 14:03:01 PDT 2012


On Oct 19, 2012, at 3:40 AM, Patrik Hägglund H <patrik.h.hagglund at ericsson.com> wrote:

> Can't llvm::PassManagerBuilder::SizeLevel be used?

>  
> In my opinion, a function attribute should only be used if there is a need for differencing between functions. For example, if you have a optimization pragma in the source code, specifying that a particular function (but not other functions) should be optimized (for size in this case).
>  
Hi Patrik,

Good point and in fact, this is what I want to do in my future plan (differencing functions).
Putting that way, is the patch fine for you?

Note that with Eli, the current patch is bigger as it includes a test case.

-Quentin

> Regards,
> Patrik Hägglund
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Quentin Colombet
> Sent: den 18 oktober 2012 20:01
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm-commits] [PATCH] Add an attribute for Oz related optimizations
> 
> Hi,
> 
> The attached patch is the first step to have a better control on Oz related optimizations.
> The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt.
> 
> The idea would be to set this attribute to all functions when the Oz optimization level is On (modification not available in this patch) and slowly tune the existing optimizations according to this attribute.
> 
> This is my first patch to llvm, so do not hesitate to make comments please.
> 
> -Quentin
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121019/b873fe67/attachment.html>


More information about the llvm-commits mailing list