]> granicus.if.org Git - llvm/commitdiff
Move static helper into ARMTargetLowering. NFC
authorDiana Picus <diana.picus@linaro.org>
Fri, 1 Sep 2017 10:44:48 +0000 (10:44 +0000)
committerDiana Picus <diana.picus@linaro.org>
Fri, 1 Sep 2017 10:44:48 +0000 (10:44 +0000)
This exposes the isReadOnly(GlobalValue *) in the ARMTargetLowering so
we can make use of it in GlobalISel as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312320 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h

index 8d04f59b95c5f7c532d03976387ed8e65d7c441b..e947ddc70314f77988faf1370cf13d0c20f8cb43 100644 (file)
@@ -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()) ||
index fd93629f08442cbebf7a9a2df6ba4533d40c8d49..40cf54586af02f478965bf533432615dd99fd395 100644 (file)
@@ -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;