[PowerPC] Support the (old) cntlz instruction alias
[oota-llvm.git] / lib / Target / X86 / X86TargetTransformInfo.h
index bb45cd7c2cfb641308f6b720bf27df165a6aa3d3..9f0adcfef623a561a2f6ffcea8f362216ad7ab12 100644 (file)
@@ -28,16 +28,19 @@ namespace llvm {
 class X86TTIImpl : public BasicTTIImplBase<X86TTIImpl> {
   typedef BasicTTIImplBase<X86TTIImpl> BaseT;
   typedef TargetTransformInfo TTI;
+  friend BaseT;
 
   const X86Subtarget *ST;
   const X86TargetLowering *TLI;
 
   unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract);
 
+  const X86Subtarget *getST() const { return ST; }
+  const X86TargetLowering *getTLI() const { return TLI; }
+
 public:
-  explicit X86TTIImpl(const X86TargetMachine *TM = nullptr)
-      : BaseT(TM), ST(TM ? TM->getSubtargetImpl() : nullptr),
-        TLI(ST ? ST->getTargetLowering() : nullptr) {}
+  explicit X86TTIImpl(const X86TargetMachine *TM, Function &F)
+      : BaseT(TM), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) {}
 
   // Provide value semantics. MSVC requires that we spell all of these out.
   X86TTIImpl(const X86TTIImpl &Arg)