[PATCH][Clang Driver] Driver::IsUsingLTO no longer return true when seeing -emit-llvm
Shuxin Yang
shuxin.llvm at gmail.com
Thu Aug 22 14:53:30 PDT 2013
On 8/22/13 2:28 PM, Eric Christopher wrote:
> On Thu, Aug 22, 2013 at 2:24 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
>> On 8/22/13 1:52 PM, Nick Lewycky wrote:
>>
>> Sorry, I totally wasn't following this thread at all. I'm assuming the goal
>> is to clean up the flags in preparation of adding more smarts to the "we're
>> doing LTO" case?
>>
>> 80% correct.
>>
>> Let us use examples to clarify the goal:
>>
>> command 1: clang -flto a.c -c
>> command 2: clang -emit-llvm a.c -c
>> command 3: clang -emit-llvm a.c
>> command 4: clang -O4 a.c -c
>>
>> The interpretation of these commands WAS:
>> command 1, 2: go through the passes defined in populateModulePasses(),
>> and emit a *.bc file.
>> command 3, 4: compile to a.out using LTO
>>
>>
>> The interpretation of these commands will be:
>> command 1: need to indicate we are preparing for LTO
>> command 2: need to indicate we are *NOT* preparing for LTO
> Good with me, though your wording is a bit awkward. I'd have said:
>
> command 1: emit bitcode and if there's any optimization then use the
> lto pre-lto pipeline.
> command 2: emit bitcode and if there's any optimization then just use
> the normal pipeline
>
> Do you agree?
Yes, u are right.
>
>> command 3: *meaningless*
> Error please. :)
I need to figure out how to complain. Should be in separate patch?
>
>> command 4: unchanged.
>>
> Equivalent to -O3 -flto?
I think so.
More information about the llvm-commits
mailing list