Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / Mips / MipsTargetTransformInfo.h
blob4c6a0cc32686f8034ac84fdd6e5f39920beb9115
1 //===-- MipsTargetTransformInfo.h - Mips specific 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETTRANSFORMINFO_H
10 #define LLVM_LIB_TARGET_MIPS_MIPSTARGETTRANSFORMINFO_H
12 #include "MipsTargetMachine.h"
13 #include "llvm/Analysis/TargetTransformInfo.h"
14 #include "llvm/CodeGen/BasicTTIImpl.h"
16 namespace llvm {
18 class MipsTTIImpl : public BasicTTIImplBase<MipsTTIImpl> {
19 using BaseT = BasicTTIImplBase<MipsTTIImpl>;
20 using TTI = TargetTransformInfo;
22 friend BaseT;
24 const MipsSubtarget *ST;
25 const MipsTargetLowering *TLI;
27 const MipsSubtarget *getST() const { return ST; }
28 const MipsTargetLowering *getTLI() const { return TLI; }
30 public:
31 explicit MipsTTIImpl(const MipsTargetMachine *TM, const Function &F)
32 : BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl(F)),
33 TLI(ST->getTargetLowering()) {}
35 bool hasDivRemOp(Type *DataType, bool IsSigned);
38 } // end namespace llvm
40 #endif