[PATCH] D47844: [ThinLTO] Compute GUID directly from GV when building per-module index

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 13:29:00 PDT 2018


tejohnson created this revision.
tejohnson added a reviewer: pcc.
Herald added a subscriber: inglorion.

I discovered when writing the summary parsing support that the
per-module index builder and writer are computing the GUID from the
value name alone (ignoring the linkage type). This was ok since those
GUID were not emitted in the bitcode, and there are never multiple
conflicting names in a single module.

However, I don't see a reason for making the GUID computation different
for the per-module case. It also makes things simpler on the parsing
side to have the GUID computation. So this patch changes the summary
analysis phase and the per-module summary writer to compute the GUID
using the facility on the GlobalValue.


Repository:
  rL LLVM

https://reviews.llvm.org/D47844

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47844.150193.patch
Type: text/x-patch
Size: 4807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180606/900c6250/attachment.bin>


More information about the llvm-commits mailing list