Implement a basic cost model for vector and scalar instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166642 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem
2012-10-24 23:47:38 +00:00
parent d95666c226
commit 2652c50f74
6 changed files with 168 additions and 23 deletions

View File

@@ -16,6 +16,7 @@
#define LLVM_TARGET_TARGET_TRANSFORMATION_IMPL_H
#include "llvm/TargetTransformInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
namespace llvm {
@@ -51,6 +52,10 @@ class VectorTargetTransformImpl : public VectorTargetTransformInfo {
private:
const TargetLowering *TLI;
/// Estimate the cost of type-legalization and the legalized type.
std::pair<unsigned, EVT>
getTypeLegalizationCost(LLVMContext &C, EVT Ty) const;
public:
explicit VectorTargetTransformImpl(const TargetLowering *TL) : TLI(TL) {}