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
This commit is contained in:
Diana Picus 2017-09-01 10:44:48 +00:00
parent b67264b182
commit 1d101d76c0
2 changed files with 3 additions and 1 deletions

View 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()) ||

View 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;