summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-26 22:13:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-26 22:13:55 +0000
commitae0d866f56278de4aa7f8b236fe5eaf48905c3cc (patch)
treeacd29bc7f54b52e9edf04c6e400c0d31e08ed0bd /llvm
parentfbf07d0f33a461a165ff3f56c76396fdcb22b516 (diff)
downloadbcm5719-llvm-ae0d866f56278de4aa7f8b236fe5eaf48905c3cc.tar.gz
bcm5719-llvm-ae0d866f56278de4aa7f8b236fe5eaf48905c3cc.zip
Refactor a duplicated predicate. NFC.
llvm-svn: 273826
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetLowering.h2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp4
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp4
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.h1
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp4
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.h1
6 files changed, 6 insertions, 10 deletions
diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h
index 4de8017237c..ee988547450 100644
--- a/llvm/include/llvm/Target/TargetLowering.h
+++ b/llvm/include/llvm/Target/TargetLowering.h
@@ -2176,6 +2176,8 @@ public:
/// NOTE: The TargetMachine owns TLOF.
explicit TargetLowering(const TargetMachine &TM);
+ bool isPositionIndependent() const;
+
/// Returns true by value, base pointer and offset pointer and addressing mode
/// by reference if the node's address can be legally represented as
/// pre-indexed load / store address.
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index dc7bb7ca817..5f091c88375 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -44,6 +44,10 @@ const char *TargetLowering::getTargetNodeName(unsigned Opcode) const {
return nullptr;
}
+bool TargetLowering::isPositionIndependent() const {
+ return getTargetMachine().getRelocationModel() == Reloc::PIC_;
+}
+
/// Check whether a given call node is in tail position within its function. If
/// so, it sets Chain to the input chain of the tail call.
bool TargetLowering::isInTailCallPosition(SelectionDAG &DAG, SDNode *Node,
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index a7d986e09ef..dd7f5218bd5 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1569,10 +1569,6 @@ void ARMTargetLowering::PassF64ArgInRegs(const SDLoc &dl, SelectionDAG &DAG,
}
}
-bool ARMTargetLowering::isPositionIndependent() const {
- return getTargetMachine().getRelocationModel() == Reloc::PIC_;
-}
-
/// LowerCall - Lowering a call into a callseq_start <-
/// ARMISD:CALL <- callseq_end chain. Also add input and output parameter
/// nodes.
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.h b/llvm/lib/Target/ARM/ARMISelLowering.h
index af8b3fb006e..94f8e6c8ae3 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.h
+++ b/llvm/lib/Target/ARM/ARMISelLowering.h
@@ -230,7 +230,6 @@ namespace llvm {
explicit ARMTargetLowering(const TargetMachine &TM,
const ARMSubtarget &STI);
- bool isPositionIndependent() const;
unsigned getJumpTableEncoding() const override;
bool useSoftFloat() const override;
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 10d525a43ae..ebd7fa619f7 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -12978,10 +12978,6 @@ static SDValue LowerToTLSExecModel(GlobalAddressSDNode *GA, SelectionDAG &DAG,
return DAG.getNode(ISD::ADD, dl, PtrVT, ThreadPointer, Offset);
}
-bool X86TargetLowering::isPositionIndependent() const {
- return getTargetMachine().getRelocationModel() == Reloc::PIC_;
-}
-
SDValue
X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const {
diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h
index 6cb858709d3..af7c270c7f2 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.h
+++ b/llvm/lib/Target/X86/X86ISelLowering.h
@@ -656,7 +656,6 @@ namespace llvm {
// X86 Implementation of the TargetLowering interface
class X86TargetLowering final : public TargetLowering {
public:
- bool isPositionIndependent() const;
explicit X86TargetLowering(const X86TargetMachine &TM,
const X86Subtarget &STI);
OpenPOWER on IntegriCloud