LLVM  15.0.0git
DirectXTargetTransformInfo.h
Go to the documentation of this file.
1 //===- DirectXTargetTransformInfo.h - DirectX TTI ---------------*- C++ -*-===//
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 ///
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
12 #define LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
13 
14 #include "DirectXSubtarget.h"
15 #include "DirectXTargetMachine.h"
17 #include "llvm/IR/Function.h"
18 
19 namespace llvm {
20 class DirectXTTIImpl : public BasicTTIImplBase<DirectXTTIImpl> {
22  using TTI = TargetTransformInfo;
23 
24  friend BaseT;
25 
26  const DirectXSubtarget *ST;
27  const DirectXTargetLowering *TLI;
28 
29  const DirectXSubtarget *getST() const { return ST; }
30  const DirectXTargetLowering *getTLI() const { return TLI; }
31 
32 public:
33  explicit DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F)
34  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
35  TLI(ST->getTargetLowering()) {}
36 };
37 } // namespace llvm
38 
39 #endif // LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
llvm::DirectXTTIImpl::DirectXTTIImpl
DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F)
Definition: DirectXTargetTransformInfo.h:33
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::DirectXTargetLowering
Definition: DirectXTargetLowering.h:23
llvm::Function
Definition: Function.h:60
llvm::DirectXTargetMachine
Definition: DirectXTargetMachine.h:19
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:170
llvm::DirectXSubtarget
Definition: DirectXSubtarget.h:30
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::TargetTransformInfoImplBase::getDataLayout
const DataLayout & getDataLayout() const
Definition: TargetTransformInfoImpl.h:46
llvm::DirectXTTIImpl
Definition: DirectXTargetTransformInfo.h:20
DirectXTargetMachine.h
llvm::BasicTTIImplBase
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:77
getParent
static const Function * getParent(const Value *V)
Definition: BasicAliasAnalysis.cpp:845
Function.h
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
DirectXSubtarget.h
BasicTTIImpl.h