diff options
author | Teresa Johnson <tejohnson@google.com> | 2017-01-05 14:32:16 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2017-01-05 14:32:16 +0000 |
commit | 519465b993268b5b07b676a5224d858169507f1b (patch) | |
tree | b9f2413824b261668e8eae7b532765adcdd72fbe /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 337139830e14dacd3b511cc180475ec277638a09 (diff) | |
download | llvm-519465b993268b5b07b676a5224d858169507f1b.zip llvm-519465b993268b5b07b676a5224d858169507f1b.tar.gz llvm-519465b993268b5b07b676a5224d858169507f1b.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 3fed1d5..19a8e24 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -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. |