[llvm] r312320 - Move static helper into ARMTargetLowering. NFC
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 03:44:48 PDT 2017
Author: rovka
Date: Fri Sep 1 03:44:48 2017
New Revision: 312320
URL: http://llvm.org/viewvc/llvm-project?rev=312320&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
llvm/trunk/lib/Target/ARM/ARMISelLowering.h
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=312320&r1=312319&r2=312320&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Sep 1 03:44:48 2017
@@ -3135,7 +3135,7 @@ static SDValue promoteToConstantPool(con
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()) ||
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=312320&r1=312319&r2=312320&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Fri Sep 1 03:44:48 2017
@@ -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;
More information about the llvm-commits
mailing list