[llvm-commits] [llvm] r65310 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Dale Johannesen dalej at apple.com
Mon Feb 23 09:50:33 PST 2009


On Feb 22, 2009, at 11:59 PMPST, Nick Lewycky wrote:

> Evan Cheng wrote:
>> Wow. How did that happen? That would explain why LTO has been
>> pessimizing code! "Fast" codegen means fast isel and disabling a lot
>> of codegen optimizations. Thanks for catching this.
>
> My guess is that somebody looked at the flag named "Fast" and said "of
> course I want fast!" It really should have been named "DisableOpt" or
> something more sinister.

That's probably true; there's a certain amount of precedent for -fast  
meaning "generate code that runs fast".   E.g. Sun's compilers and  
Apple's versions of gcc have this.

> And yes, I expect this to put an end to the mysterious "my code is
> slower with LTO" problem. :)
>
> Nick
>
>> Evan
>>
>> On Feb 22, 2009, at 11:41 PM, Nick Lewycky wrote:
>>
>>> Author: nicholas
>>> Date: Mon Feb 23 01:41:55 2009
>>> New Revision: 65310
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=65310&view=rev
>>> Log:
>>> If nobody minds, I'm using LTO to produce faster binaries. Switch
>>> fast codegen
>>> off in libLTO.
>>>
>>> Modified:
>>>   llvm/trunk/tools/lto/LTOCodeGenerator.cpp
>>>
>>> Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=65310&r1=65309&r2=65310&view=diff
>>>
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> = 
>>> = 
>>> ====================================================================
>>> --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
>>> +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Mon Feb 23 01:41:55  
>>> 2009
>>> @@ -420,7 +420,7 @@
>>>    MachineCodeEmitter* mce = NULL;
>>>
>>>    switch (_target->addPassesToEmitFile(*codeGenPasses, out,
>>> -                                      TargetMachine::AssemblyFile,
>>> true)) {
>>> +                                      TargetMachine::AssemblyFile,
>>> false)) {
>>>        case FileModel::MachOFile:
>>>            mce = AddMachOWriter(*codeGenPasses, out, *_target);
>>>            break;
>>> @@ -435,7 +435,7 @@
>>>            return true;
>>>    }
>>>
>>> -    if (_target->addPassesToEmitFileFinish(*codeGenPasses, mce,
>>> true)) {
>>> +    if (_target->addPassesToEmitFileFinish(*codeGenPasses, mce,
>>> false)) {
>>>        errMsg = "target does not support generation of this file
>>> type";
>>>        return true;
>>>    }
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list