[PATCH] D35189: Add GUID-ValueID map and original name to ThinLTO summary.
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 12:37:24 PDT 2017
On Mon, Jul 10, 2017 at 12:30 PM, Peter Collingbourne via Phabricator <
reviews at reviews.llvm.org> wrote:
> pcc added a comment.
>
> > the global VST (for the global values we will have in the index) does
> not.
>
> Not quite, global VSTs include a reference to the symbol name in the
> strtab.
>
That's what I was thinking when we chatted about this with Haojie, but it
turns out I was wrong. The global VST includes the value id and the bitcode
offset of the function definition in the IR:
http://llvm-cs.pcc.me.uk/lib/Bitcode/Writer/BitcodeWriter.cpp#2763
The offset to the symbol name is included in the MODULE_CODE_FUNCTION entry:
http://llvm-cs.pcc.me.uk/lib/Bitcode/Writer/BitcodeWriter.cpp#1170
which is not really in the global VST.
> > But I think infer it from the code in my previous inline comment, it is
> "we need the name to recompute a GUID for internal symbol promoted to
> global", correct?
>
> Names of globals are also necessary for symbol resolution.
>
>
> https://reviews.llvm.org/D35189
>
>
>
>
--
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/8bf29744/attachment.html>
More information about the llvm-commits
mailing list