[PATCH] D41113: [LLVMgold] Don't set resolutions for undefined symbols to 'Prevailing'

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 12:41:02 PST 2017


tejohnson added a comment.

In https://reviews.llvm.org/D41113#954157, @pcc wrote:

> This seems fine to me with the assert.
>
> > There's even a probable current issue - if the prevailing def in the asm is marked dead, anything reachable from it might be marked dead as well (i.e. if the only use is in that def).
>
> Module asm definitions do not refer to anything at the summary level, so it does not matter if we mark them as dead. Any symbols that are referenced from module inline asm are GC roots because of https://reviews.llvm.org/D32544.


Ok right, any use in module asm that is defined in IR will get an IRName from the prevailing def there, and be marked as VisibleOutsideSummary.
Any def in module asm that is used in IR must have a declaration in IR - presumably we won't end up with a Prevailing def that sets the IRName, but it will just look like something defined outside of the index, and we won't have a summary to mark dead or internalized or anything incorrect (the module summary builder skips declarations).

So with the new assert ensuring that we don't overwrite a non-empty IRName, this LGTM.


https://reviews.llvm.org/D41113





More information about the llvm-commits mailing list