[LLVMdev] -Os

Jim Grosbach grosbach at apple.com
Tue Jul 23 11:36:08 PDT 2013


On Jul 23, 2013, at 5:22 AM, reed kotler <rkotler at mips.com> wrote:

> On 07/23/2013 05:19 AM, Konstantin Tokarev wrote:
>> 
>> 23.07.2013, 16:05, "reed kotler" <rkotler at mips.com>:
>>> When I use -Os with a clang that implicitly calls llc, I get much
>>> different code than when call clang first with -Os and then call llc.
>> clang does NOT call llc internally.
> I understand. It's invoking that functionality is what I meant to say but not technically
> running that command.

This isn’t just a nitpick. This is exactly why you’re seeing differences. The pass managers aren’t always set up the same, for example.

FWIW, I feel your pain. This is a long-standing weakness of our infrastructure.

-Jim

>> 
>>> How do I get these two paths to generate the same code?
>> Call llc with -Os?
> You can't pass -Os to llc.
> 
> -Os is a clang only option. It's reflected in the IR used by llc in the function attributes.
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130723/3ff107c0/attachment.html>


More information about the llvm-dev mailing list