Implement a basic VectorTargetTransformInfo interface to be used by the loop and...
[oota-llvm.git] / include / llvm / Target / TargetTransformImpl.h
index 7648f4f935c4fc10136a77caab40ab26986fbb43..ec39f9968e010dbcaae4e383b86ba6c80aa94c4f 100644 (file)
@@ -47,7 +47,23 @@ public:
   virtual unsigned getJumpBufSize() const;
 };
 
-class VectorTargetTransformImpl : public VectorTargetTransformInfo { };
+class VectorTargetTransformImpl : public VectorTargetTransformInfo {
+private:
+  const TargetLowering *TLI;
+
+public:
+  explicit VectorTargetTransformImpl(const TargetLowering *TL) : TLI(TL) {}
+  
+  virtual ~VectorTargetTransformImpl() {}
+
+  virtual unsigned getInstrCost(unsigned Opcode, Type *Ty1, Type *Ty2) const;
+
+  virtual unsigned getBroadcastCost(Type *Tp) const;
+
+  virtual unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
+                                   unsigned Alignment,
+                                   unsigned AddressSpace) const;
+};
 
 } // end llvm namespace