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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 07:40:21 PST 2016


tejohnson added a comment.

On Sat, Nov 12, 2016 at 10:04 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

> Not sure about 1: you can’t assume of whatever specific meaning is attached to a section in general.

Meaning we wouldn't necessarily be able to import as a copy? I was basing this suggestion on the discussion we had for the patch that initially limited importing of global values with sections (https://reviews.llvm.org/D18298), which is when the FIXME about importing these as copies was added.

> In case 3, it is difficult because you don’t know what Z is referencing. And you would have to import the full module ASM block, which can contains another global, and then you’d define the global in two modules.

True, that is going to be difficult, we'd have to split out the module asm part defining the local Z and append that in the importing module. And ensure the module asm analysis looks for references of locals (it will already report uses of globals). Maybe not worth the trouble.

> Also, if you still want to keep the separated flag, then MayReferenceNoRename isn’t great: it should be targeting the case 2 you mentioned exclusively, so it should be something like HasInlineASMReferencingInternal or something like that.

Ok, will update the name. Although we don't know for sure whether the inline asm references a local, so perhaps HasInlineASMMaybeReferencingInternal. 
A mouthful, but more descriptive.


https://reviews.llvm.org/D26402





More information about the llvm-commits mailing list