LLVM 20.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"
17#include "llvm/IR/Function.h"
18
19namespace llvm {
20class DirectXTTIImpl : public BasicTTIImplBase<DirectXTTIImpl> {
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
32public:
33 explicit DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F)
34 : BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl(F)),
35 TLI(ST->getTargetLowering()) {}
36 unsigned getMinVectorRegisterBitWidth() const { return 32; }
37};
38} // namespace llvm
39
40#endif // LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
#define F(x, y, z)
Definition: MD5.cpp:55
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:81
DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F)
unsigned getMinVectorRegisterBitWidth() const
const DataLayout & getDataLayout() const
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18