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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 14:24:18 PST 2016

tejohnson added a comment.

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

> Current thought: do we still need the `NoRename` flag or could this totally replace it?

Possibly, e.g. we shouldn't have any existing external references to anything that is NoRename (since only locals matter, and they can't already have external references), so we could just mark the things that reference such values. with e.g. the new flag and prevent their importing. When building a summary, we could presumably walk through all references/calls from that and check whether any is a local that either has a section or is in a llvm(*).used set, and mark the referencing summary with this flag if so.

However, the NoRename flag is also used to prevent promotion of any of those values in the exporting module (the main module being compiled in the backend). Without this flag, we could presumably compute the set of NoRename values in the module on the fly the same way the ModuleSummary builder does though.

Not having the extra flag costs a bit more compile time but saves a bit in the flags (although in the common case where these flags are not set it is essentially free in the vbr encoded flag operand). I'm not sure which approach is better.


More information about the llvm-commits mailing list