1 //=- llvm/Target/TargetTransformImpl.h - Target Loop Trans Info----*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the target-specific implementations of the
11 // TargetTransform interfaces.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TARGET_TARGET_TRANSFORMATION_IMPL_H
16 #define LLVM_TARGET_TARGET_TRANSFORMATION_IMPL_H
18 #include "llvm/TargetTransformInfo.h"
24 /// ScalarTargetTransformInfo - This is a default implementation for the
25 /// ScalarTargetTransformInfo interface. Different targets can implement
26 /// this interface differently.
27 class ScalarTargetTransformImpl : public ScalarTargetTransformInfo {
29 const TargetLowering *TLI;
33 explicit ScalarTargetTransformImpl(const TargetLowering *TL) : TLI(TL) {}
35 virtual bool isLegalAddImmediate(int64_t imm) const;
37 virtual bool isLegalICmpImmediate(int64_t imm) const;
39 virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const;
41 virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const;
43 virtual bool isTypeLegal(Type *Ty) const;
45 virtual unsigned getJumpBufAlignment() const;
47 virtual unsigned getJumpBufSize() const;
50 class VectorTargetTransformImpl : public VectorTargetTransformInfo { };
52 } // end llvm namespace