Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / DirectX / DirectXTargetTransformInfo.h
blobed98355fad002d2129d1b1e710efe15c4719048c
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 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
12 #define LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
14 #include "DirectXSubtarget.h"
15 #include "DirectXTargetMachine.h"
16 #include "llvm/CodeGen/BasicTTIImpl.h"
17 #include "llvm/IR/Function.h"
19 namespace llvm {
20 class DirectXTTIImpl : public BasicTTIImplBase<DirectXTTIImpl> {
21 using BaseT = BasicTTIImplBase<DirectXTTIImpl>;
22 using TTI = TargetTransformInfo;
24 friend BaseT;
26 const DirectXSubtarget *ST;
27 const DirectXTargetLowering *TLI;
29 const DirectXSubtarget *getST() const { return ST; }
30 const DirectXTargetLowering *getTLI() const { return TLI; }
32 public:
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; }
38 } // namespace llvm
40 #endif // LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H