summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp5
3 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index f2af9164839..f224b046d70 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -838,9 +838,9 @@ static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags(uint64_t RawFlags,
// to getDecodedLinkage() will need to be taken into account here as above.
auto Linkage = GlobalValue::LinkageTypes(RawFlags & 0xF); // 4 bits
RawFlags = RawFlags >> 4;
- bool HasSection = RawFlags & 0x1;
+ bool NoRename = RawFlags & 0x1;
bool IsNotViableToInline = RawFlags & 0x2;
- return GlobalValueSummary::GVFlags(Linkage, HasSection, IsNotViableToInline);
+ return GlobalValueSummary::GVFlags(Linkage, NoRename, IsNotViableToInline);
}
static GlobalValue::VisibilityTypes getDecodedVisibility(unsigned Val) {
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 6bd1bf1b8cc..2972688992f 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -990,7 +990,7 @@ static unsigned getEncodedLinkage(const GlobalValue &GV) {
static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) {
uint64_t RawFlags = 0;
- RawFlags |= Flags.HasSection; // bool
+ RawFlags |= Flags.NoRename; // bool
RawFlags |= (Flags.IsNotViableToInline << 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
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 29c54dc9f9c..c9f4ea06a90 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -111,8 +111,9 @@ static bool canBeExternallyReferenced(const GlobalValueSummary &Summary) {
if (!Summary.needsRenaming())
return true;
- if (Summary.hasSection())
- // Can't rename a global that needs renaming if has a section.
+ if (Summary.noRename())
+ // Can't externally reference a global that needs renaming if has a section
+ // or is referenced from inline assembly, for example.
return false;
return true;
OpenPOWER on IntegriCloud