summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/ARM/ARMMachineFunctionInfo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h b/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
index f71497240ff..52ba6a49fd5 100644
--- a/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
+++ b/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
@@ -121,6 +121,9 @@ class ARMFunctionInfo : public MachineFunctionInfo {
/// copies.
bool IsSplitCSR;
+ /// Globals that have had their storage promoted into the constant pool.
+ SmallVector<const GlobalVariable*,2> PromotedGlobals;
+
public:
ARMFunctionInfo() :
isThumb(false),
@@ -226,6 +229,16 @@ public:
}
return It;
}
+
+ /// Indicate to the backend that \c GV has had its storage changed to inside
+ /// a constant pool. This means it no longer needs to be emitted as a
+ /// global variable.
+ void markGlobalAsPromotedToConstantPool(const GlobalVariable *GV) {
+ PromotedGlobals.push_back(GV);
+ }
+ ArrayRef<const GlobalVariable*> getGlobalsPromotedToConstantPool() {
+ return PromotedGlobals;
+ }
};
} // End llvm namespace
OpenPOWER on IntegriCloud