[llvm] r185882 - Don't run internalize if we're outputing bit-code and not an object file.

Shuxin Yang shuxin.llvm at gmail.com
Fri Aug 9 11:02:37 PDT 2013


This topic become hot recently:-) As far as I can understand from the 
discussion, I guess the commit
log is better saying "Don't run internalize if the LTO dose not see the 
whole program".

"Whole/incomplete program" is in general very confusing, as different 
analyzers may have different
interpretation of it. In the symbol resolution, I think it has no 
ambiguity -- whole-program means
seeing all occurrence of the symbols; "incomplete program" mans otherwise.


On 7/8/13 4:54 PM, Chris Lattner wrote:
> On Jul 8, 2013, at 4:23 PM, Bill Wendling <isanbard at gmail.com> wrote:
>
>> Author: void
>> Date: Mon Jul  8 18:23:03 2013
>> New Revision: 185882
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=185882&view=rev
>> Log:
>> Don't run internalize if we're outputing bit-code and not an object file.
>>
>> The problem with running internalize before we're ready to output an object file
>> is that it may change a 'weak' symbol into an internal one, but that symbol
>> could be needed by an external object file --- e.g. with arclite.
> I don't understand: how does output format affect symbol visibility?
>
> -Chris
>
>> <rdar://problem/14334895>
>>
>> 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=185882&r1=185881&r2=185882&view=diff
>> ==============================================================================
>> --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
>> +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Mon Jul  8 18:23:03 2013
>> @@ -130,8 +130,10 @@ bool LTOCodeGenerator::writeMergedModule
>>    if (determineTarget(errMsg))
>>      return true;
>>
>> -  // mark which symbols can not be internalized
>> -  applyScopeRestrictions();
>> +  // Run the verifier on the merged modules.
>> +  PassManager passes;
>> +  passes.add(createVerifierPass());
>> +  passes.run(*_linker.getModule());
>>
>>    // create output file
>>    std::string ErrInfo;
>>
>>
>> _______________________________________________
>> 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