LLVM
15.0.0git
lib
CodeGen
BasicTargetTransformInfo.cpp
Go to the documentation of this file.
1
//===- BasicTargetTransformInfo.cpp - Basic target-independent TTI impl ---===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
/// \file
9
/// This file provides the implementation of a basic TargetTransformInfo pass
10
/// predicated on the target abstractions present in the target independent
11
/// code generator. It uses these (primarily TargetLowering) to model as much
12
/// of the TTI query interface as possible. It is included by most targets so
13
/// that they can specialize only a small subset of the query space.
14
///
15
//===----------------------------------------------------------------------===//
16
17
#include "
llvm/CodeGen/BasicTTIImpl.h
"
18
#include "
llvm/CodeGen/TargetSubtargetInfo.h
"
19
#include "
llvm/IR/Function.h
"
20
#include "
llvm/Support/CommandLine.h
"
21
#include "
llvm/Target/TargetMachine.h
"
22
23
using namespace
llvm
;
24
25
// This flag is used by the template base class for BasicTTIImpl, and here to
26
// provide a definition.
27
cl::opt<unsigned>
28
llvm::PartialUnrollingThreshold
(
"partial-unrolling-threshold"
,
cl::init
(0),
29
cl::desc
(
"Threshold for partial unrolling"
),
30
cl::Hidden
);
31
32
BasicTTIImpl::BasicTTIImpl
(
const
TargetMachine
*
TM
,
const
Function
&
F
)
33
:
BaseT
(
TM
,
F
.
getParent
()->getDataLayout()),
ST
(
TM
->getSubtargetImpl(
F
)),
34
TLI(
ST
->getTargetLowering()) {}
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::Function
Definition:
Function.h:60
llvm::cl::Hidden
@ Hidden
Definition:
CommandLine.h:139
F
#define F(x, y, z)
Definition:
MD5.cpp:55
CommandLine.h
TargetMachine.h
llvm::PartialUnrollingThreshold
cl::opt< unsigned > PartialUnrollingThreshold
llvm::cl::opt
Definition:
CommandLine.h:1392
llvm::ARM_MB::ST
@ ST
Definition:
ARMBaseInfo.h:73
llvm::cl::init
initializer< Ty > init(const Ty &Val)
Definition:
CommandLine.h:432
llvm::BasicTTIImplBase< BasicTTIImpl >
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition:
TargetMachine.h:77
llvm::BasicTTIImpl::BasicTTIImpl
BasicTTIImpl(const TargetMachine *TM, const Function &F)
Definition:
BasicTargetTransformInfo.cpp:32
getParent
static const Function * getParent(const Value *V)
Definition:
BasicAliasAnalysis.cpp:845
TargetSubtargetInfo.h
Function.h
TM
const char LLVMTargetMachineRef TM
Definition:
PassBuilderBindings.cpp:47
BasicTTIImpl.h
llvm::cl::desc
Definition:
CommandLine.h:405
Generated on Sat Jul 2 2022 01:11:57 for LLVM by
1.8.17