]> granicus.if.org Git - llvm/commitdiff
Refactor a duplicated predicate. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 26 Jun 2016 22:13:55 +0000 (22:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 26 Jun 2016 22:13:55 +0000 (22:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273826 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h

index 4de8017237c4d062640767c7c9943cc1e664deab..ee988547450a83dbdfddb59f5b9416a5dc2c80a8 100644 (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.
index dc7bb7ca8175e7c93b407e161496ec82f1204e9e..5f091c88375086cc37104f204fbf3a262989df05 100644 (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,
index a7d986e09efaf5d87f467c5fa6e6a2d7cc2bae0f..dd7f5218bd5efc9f66357d986171da027635926c 100644 (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.
index af8b3fb006e6f74f4977f506d2e9338fb973f5eb..94f8e6c8ae3300740b579a9ed2d4bb48c13f2503 100644 (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;
 
index 10d525a43ae8c5d196b23391129cb7324f563f8d..ebd7fa619f7f931e48288b3e74f932eebd9419b4 100644 (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 {
 
index 6cb858709d3e9a0e67b0b416f7d1b9ed8ca4824c..af7c270c7f242dbfd4fedb6d433f4cacf666a446 100644 (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);