[PowerPC] Support the (old) cntlz instruction alias
[oota-llvm.git] / lib / Target / X86 / X86TargetTransformInfo.h
index c77452b0a56fec3821e1a730cf551ddc788ae7dd..9f0adcfef623a561a2f6ffcea8f362216ad7ab12 100644 (file)
@@ -28,15 +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)
-      : BaseT(TM), ST(TM->getSubtargetImpl()), TLI(ST->getTargetLowering()) {}
+  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)