[CodeGen] Split -enable-global-merge into ARM and AArch64 options.
[oota-llvm.git] / lib / Target / ARM / ARMTargetTransformInfo.h
index b9e52914d2ad5e596f5ffb53c21dd1c440945132..97590f60893aff5b85c40a67223b7deed3d65e8e 100644 (file)
@@ -30,7 +30,6 @@ class ARMTTIImpl : public BasicTTIImplBase<ARMTTIImpl> {
   typedef TargetTransformInfo TTI;
   friend BaseT;
 
-  const ARMBaseTargetMachine *TM;
   const ARMSubtarget *ST;
   const ARMTargetLowering *TLI;
 
@@ -38,30 +37,27 @@ class ARMTTIImpl : public BasicTTIImplBase<ARMTTIImpl> {
   /// are set if the result needs to be inserted and/or extracted from vectors.
   unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract);
 
-  const ARMBaseTargetMachine *getTM() const { return TM; }
+  const ARMSubtarget *getST() const { return ST; }
   const ARMTargetLowering *getTLI() const { return TLI; }
 
 public:
   explicit ARMTTIImpl(const ARMBaseTargetMachine *TM, Function &F)
-      : BaseT(TM), TM(TM), ST(TM->getSubtargetImpl(F)),
-        TLI(ST->getTargetLowering()) {}
+      : BaseT(TM), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) {}
 
   // Provide value semantics. MSVC requires that we spell all of these out.
   ARMTTIImpl(const ARMTTIImpl &Arg)
-      : BaseT(static_cast<const BaseT &>(Arg)), TM(Arg.TM), ST(Arg.ST), TLI(Arg.TLI) {}
+      : BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
   ARMTTIImpl(ARMTTIImpl &&Arg)
-      : BaseT(std::move(static_cast<BaseT &>(Arg))), TM(std::move(Arg.TM)),
-        ST(std::move(Arg.ST)), TLI(std::move(Arg.TLI)) {}
+      : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),
+        TLI(std::move(Arg.TLI)) {}
   ARMTTIImpl &operator=(const ARMTTIImpl &RHS) {
     BaseT::operator=(static_cast<const BaseT &>(RHS));
-    TM = RHS.TM;
     ST = RHS.ST;
     TLI = RHS.TLI;
     return *this;
   }
   ARMTTIImpl &operator=(ARMTTIImpl &&RHS) {
     BaseT::operator=(std::move(static_cast<BaseT &>(RHS)));
-    TM = std::move(RHS.TM);
     ST = std::move(RHS.ST);
     TLI = std::move(RHS.TLI);
     return *this;
@@ -118,6 +114,8 @@ public:
 
   unsigned getAddressComputationCost(Type *Val, bool IsComplex);
 
+  unsigned getFPOpCost(Type *Ty);
+
   unsigned getArithmeticInstrCost(
       unsigned Opcode, Type *Ty,
       TTI::OperandValueKind Op1Info = TTI::OK_AnyValue,