1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Refactor a duplicated predicate. NFC.

llvm-svn: 273826
This commit is contained in:
Rafael Espindola 2016-06-26 22:13:55 +00:00
parent 6a9131b3fe
commit b7b569afff
6 changed files with 6 additions and 10 deletions

View File

@ -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.

View File

@ -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,

View File

@ -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.

View File

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

View File

@ -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 {

View File

@ -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);