[PATCH] D42995: [ThinLTO] Ignore object files with empty ThinLTO index
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 7 01:17:10 PST 2018
vitalybuka added a comment.
In https://reviews.llvm.org/D42995#1000155, @vitalybuka wrote:
> In https://reviews.llvm.org/D42995#1000025, @tejohnson wrote:
>
> > > Empty ThinLTOIndexFile signals that we don't need this module during
> > > linking.
> >
> > Not the only case actually. We now also pass an empty index file when we want to compile the bitcode down to object without applying any LTO optimization (there are a few cases where we decide we want to turn off LTO optimizations for some links), and this is currently relying on being able to pass /dev/null for the index file that would be broken by this change.
>
>
> I'd expect this should be done by indexing and content is already in the merged object file.
> Not sure how to reproduce this. I've build some large targets and I never seen this.
At least with gold I don't see how this possible. I see that thinlto.bc can be empty only
if getSymbolsAndView returns nullptr or if LTOInfo for input object was false.
Former means that we don't need this object and so I created this patch.
For latter we already going to do the same anyway: https://reviews.llvm.org/D42680
https://reviews.llvm.org/D42995
More information about the cfe-commits
mailing list