LLVM  4.0.0
BasicTargetTransformInfo.cpp
Go to the documentation of this file.
1 //===- BasicTargetTransformInfo.cpp - Basic target-independent TTI impl ---===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 /// \file
10 /// This file provides the implementation of a basic TargetTransformInfo pass
11 /// predicated on the target abstractions present in the target independent
12 /// code generator. It uses these (primarily TargetLowering) to model as much
13 /// of the TTI query interface as possible. It is included by most targets so
14 /// that they can specialize only a small subset of the query space.
15 ///
16 //===----------------------------------------------------------------------===//
17 
19 #include "llvm/Analysis/LoopInfo.h"
22 #include "llvm/CodeGen/Passes.h"
24 #include <utility>
25 using namespace llvm;
26 
27 #define DEBUG_TYPE "basictti"
28 
29 // This flag is used by the template base class for BasicTTIImpl, and here to
30 // provide a definition.
32  llvm::PartialUnrollingThreshold("partial-unrolling-threshold", cl::init(0),
33  cl::desc("Threshold for partial unrolling"),
34  cl::Hidden);
35 
37  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
38  TLI(ST->getTargetLowering()) {}
This file provides helpers for the implementation of a TargetTransformInfo-conforming class...
BasicTTIImpl(const TargetMachine *ST, const Function &F)
#define F(x, y, z)
Definition: MD5.cpp:51
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:395
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
cl::opt< unsigned > PartialUnrollingThreshold
static const Function * getParent(const Value *V)
Primary interface to the complete machine description for the target machine.
This pass exposes codegen information to IR-level passes.