[PATCH] D26402: [ThinLTO] Make inline assembly handling more efficient in summary

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 08:20:53 PST 2016


tejohnson added a comment.

In https://reviews.llvm.org/D26402#590060, @mehdi_amini wrote:

> I'm not concerned about saving a bit of spending a little more compile time, but more about not maintaining redundant information, which can make things harder to understand in general (and invariant harder to maintain/enforce).
>
> We shouldn't have to spend compile time in the promotion phase, and I don't expect this flag to be used here anyway, because we promote only what is exported and such "NoRename" symbol shouldn't be exported in the first place.


Sort of - we will look at the export lists (actually the linkage as marked in the index) when we decide what to internalize, but not what to promote in renameModuleForThinLTO. This means that we first aggressively promote/rename what we can, then we internalize anything that didn't need to be promoted. It has been on my list of things to fix (see the FIXME in llvm::thinLTOInternalizeModule MustPromoteGV for example). I guess this is a good time to fix it. I think there is a quick fix since we are now getting the summary entry already in doPromoteLocalToGlobal in order to check the NoRename flag, it can just check the linkage type in the entry instead. Will try that out.


https://reviews.llvm.org/D26402





More information about the llvm-commits mailing list