summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2017-02-02 18:24:37 +0000
committerMehdi Amini <mehdi.amini@apple.com>2017-02-02 18:24:37 +0000
commit827600deaf7b35ca55bcee4e2b226bb669aaf299 (patch)
tree6e8d72bad974648e30247321a8a03226df5d3ecb /llvm/lib/Bitcode
parent86b03cf08623237f3c596a46dc2e3441d3818059 (diff)
downloadbcm5719-llvm-827600deaf7b35ca55bcee4e2b226bb669aaf299.tar.gz
bcm5719-llvm-827600deaf7b35ca55bcee4e2b226bb669aaf299.zip
Revert "[ThinLTO] Add an auto-hide feature"
This reverts r293912, bots are broken. llvm-svn: 293914
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp9
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp8
2 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index c9d2ad5c71b..a46e49ccde8 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -800,14 +800,13 @@ static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags(uint64_t RawFlags,
// like getDecodedLinkage() above. Any future change to the linkage enum and
// to getDecodedLinkage() will need to be taken into account here as above.
auto Linkage = GlobalValue::LinkageTypes(RawFlags & 0xF); // 4 bits
- bool NotEligibleToImport = ((RawFlags >> 4) & 0x1) || Version < 3;
+ RawFlags = RawFlags >> 4;
+ bool NotEligibleToImport = (RawFlags & 0x1) || Version < 3;
// The LiveRoot flag wasn't introduced until version 3. For dead stripping
// to work correctly on earlier versions, we must conservatively treat all
// values as live.
- bool LiveRoot = ((RawFlags >> 5) & 0x1) || Version < 3;
- bool AutoHide = (RawFlags >> 6) & 0x1;
- return GlobalValueSummary::GVFlags(Linkage, NotEligibleToImport, LiveRoot,
- AutoHide);
+ bool LiveRoot = (RawFlags & 0x2) || Version < 3;
+ return GlobalValueSummary::GVFlags(Linkage, NotEligibleToImport, LiveRoot);
}
static GlobalValue::VisibilityTypes getDecodedVisibility(unsigned Val) {
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index bdb57f59dde..4eac89c37a5 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -971,13 +971,13 @@ static unsigned getEncodedLinkage(const GlobalValue &GV) {
static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) {
uint64_t RawFlags = 0;
+ RawFlags |= Flags.NotEligibleToImport; // bool
+ RawFlags |= (Flags.LiveRoot << 1);
// 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.
- RawFlags |= Flags.Linkage; // 4 bits linkage
- RawFlags |= (Flags.NotEligibleToImport << 4); // bool
- RawFlags |= (Flags.LiveRoot << 5); // bool
- RawFlags |= (Flags.AutoHide << 6); // bool
+ RawFlags = (RawFlags << 4) | Flags.Linkage; // 4 bits
+
return RawFlags;
}
OpenPOWER on IntegriCloud