diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-09-01 10:44:48 +0000 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-09-01 10:44:48 +0000 |
commit | 1d101d76c02b02e304b28e7bdea7de536975b899 (patch) | |
tree | 0eced3178b21fd8fcadf16bd399f6420f8240ed8 /llvm/lib | |
parent | b67264b1824fbcfa2da11e9c5fb77e1d6ead4144 (diff) | |
download | bcm5719-llvm-1d101d76c02b02e304b28e7bdea7de536975b899.tar.gz bcm5719-llvm-1d101d76c02b02e304b28e7bdea7de536975b899.zip |
Move static helper into ARMTargetLowering. NFC
This exposes the isReadOnly(GlobalValue *) in the ARMTargetLowering so
we can make use of it in GlobalISel as well.
llvm-svn: 312320
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 8d04f59b95c..e947ddc7031 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -3135,7 +3135,7 @@ static SDValue promoteToConstantPool(const GlobalValue *GV, SelectionDAG &DAG, return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, CPAddr); } -static bool isReadOnly(const GlobalValue *GV) { +bool ARMTargetLowering::isReadOnly(const GlobalValue *GV) const { if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV)) GV = GA->getBaseObject(); return (isa<GlobalVariable>(GV) && cast<GlobalVariable>(GV)->isConstant()) || diff --git a/llvm/lib/Target/ARM/ARMISelLowering.h b/llvm/lib/Target/ARM/ARMISelLowering.h index fd93629f084..40cf54586af 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.h +++ b/llvm/lib/Target/ARM/ARMISelLowering.h @@ -275,6 +275,8 @@ class InstrItineraryData; return (Kind != ScalarCondVectorVal); } + bool isReadOnly(const GlobalValue *GV) const; + /// getSetCCResultType - Return the value type to use for ISD::SETCC. EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override; |