X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTarget%2FTargetTransformImpl.h;h=f4ec97ae93420e77128b571c26f02579fbe96362;hb=5518a1355b8b09bf92419b65ea4e4854734b0ebc;hp=625be7208ad6d5e5c9794385a8e57e47405fad5b;hpb=b4b04c3fa0a5da15424de7818e9f72811495c65b;p=oota-llvm.git diff --git a/include/llvm/Target/TargetTransformImpl.h b/include/llvm/Target/TargetTransformImpl.h index 625be7208ad..f4ec97ae934 100644 --- a/include/llvm/Target/TargetTransformImpl.h +++ b/include/llvm/Target/TargetTransformImpl.h @@ -15,8 +15,8 @@ #ifndef LLVM_TARGET_TARGET_TRANSFORMATION_IMPL_H #define LLVM_TARGET_TARGET_TRANSFORMATION_IMPL_H -#include "llvm/TargetTransformInfo.h" #include "llvm/CodeGen/ValueTypes.h" +#include "llvm/TargetTransformInfo.h" namespace llvm { @@ -26,7 +26,7 @@ class TargetLowering; /// ScalarTargetTransformInfo interface. Different targets can implement /// this interface differently. class ScalarTargetTransformImpl : public ScalarTargetTransformInfo { -private: +protected: const TargetLowering *TLI; public: @@ -55,13 +55,15 @@ protected: const TargetLowering *TLI; /// Estimate the cost of type-legalization and the legalized type. - std::pair - getTypeLegalizationCost(LLVMContext &C, EVT Ty) const; + std::pair getTypeLegalizationCost(Type *Ty) const; /// Estimate the overhead of scalarizing an instruction. Insert and Extract /// are set if the result needs to be inserted and/or extracted from vectors. unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const; + // Get the ISD node that corresponds to the Instruction class opcode. + int InstructionOpcodeToISD(unsigned Opcode) const; + public: explicit VectorTargetTransformImpl(const TargetLowering *TL) : TLI(TL) {}