/// 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.
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,
}
}
-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.
explicit ARMTargetLowering(const TargetMachine &TM,
const ARMSubtarget &STI);
- bool isPositionIndependent() const;
unsigned getJumpTableEncoding() const override;
bool useSoftFloat() const override;
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 {
// X86 Implementation of the TargetLowering interface
class X86TargetLowering final : public TargetLowering {
public:
- bool isPositionIndependent() const;
explicit X86TargetLowering(const X86TargetMachine &TM,
const X86Subtarget &STI);