mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-16 11:44:43 -04:00
[ThinLTO] Subsume all importing checks into a single flag
Summary: This adds a new summary flag NotEligibleToImport that subsumes several existing flags (NoRename, HasInlineAsmMaybeReferencingInternal and IsNotViableToInline). It also subsumes the checking of references on the summary that was being done during the thin link by eligibleForImport() for each candidate. It is much more efficient to do that checking once during the per-module summary build and record it in the summary. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28169 llvm-svn: 291108
This commit is contained in:
@@ -971,9 +971,7 @@ static unsigned getEncodedLinkage(const GlobalValue &GV) {
|
||||
static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) {
|
||||
uint64_t RawFlags = 0;
|
||||
|
||||
RawFlags |= Flags.NoRename; // bool
|
||||
RawFlags |= (Flags.IsNotViableToInline << 1);
|
||||
RawFlags |= (Flags.HasInlineAsmMaybeReferencingInternal << 2);
|
||||
RawFlags |= Flags.NotEligibleToImport; // bool
|
||||
// Linkage don't need to be remapped at that time for the summary. Any future
|
||||
// change to the getEncodedLinkage() function will need to be taken into
|
||||
// account here as well.
|
||||
@@ -3435,7 +3433,7 @@ void ModuleBitcodeWriter::writeModuleLevelReferences(
|
||||
// Current version for the summary.
|
||||
// This is bumped whenever we introduce changes in the way some record are
|
||||
// interpreted, like flags for instance.
|
||||
static const uint64_t INDEX_VERSION = 2;
|
||||
static const uint64_t INDEX_VERSION = 3;
|
||||
|
||||
/// Emit the per-module summary section alongside the rest of
|
||||
/// the module's bitcode.
|
||||
|
||||
Reference in New Issue
Block a user