[llvm] r273826 - Refactor a duplicated predicate. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 26 15:13:55 PDT 2016
Author: rafael
Date: Sun Jun 26 17:13:55 2016
New Revision: 273826
URL: http://llvm.org/viewvc/llvm-project?rev=273826&view=rev
Log:
Refactor a duplicated predicate. NFC.
Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
llvm/trunk/lib/Target/ARM/ARMISelLowering.h
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.h
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Sun Jun 26 17:13:55 2016
@@ -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.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Jun 26 17:13:55 2016
@@ -44,6 +44,10 @@ const char *TargetLowering::getTargetNod
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,
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Sun Jun 26 17:13:55 2016
@@ -1569,10 +1569,6 @@ void ARMTargetLowering::PassF64ArgInRegs
}
}
-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.
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Sun Jun 26 17:13:55 2016
@@ -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;
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Jun 26 17:13:55 2016
@@ -12978,10 +12978,6 @@ static SDValue LowerToTLSExecModel(Globa
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 {
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=273826&r1=273825&r2=273826&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Sun Jun 26 17:13:55 2016
@@ -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);
More information about the llvm-commits
mailing list