LLVM  16.0.0git
MipsTargetTransformInfo.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETTRANSFORMINFO_H
10 #define LLVM_LIB_TARGET_MIPS_MIPSTARGETTRANSFORMINFO_H
11 
12 #include "MipsTargetMachine.h"
15 
16 namespace llvm {
17 
18 class MipsTTIImpl : public BasicTTIImplBase<MipsTTIImpl> {
20  using TTI = TargetTransformInfo;
21 
22  friend BaseT;
23 
24  const MipsSubtarget *ST;
25  const MipsTargetLowering *TLI;
26 
27  const MipsSubtarget *getST() const { return ST; }
28  const MipsTargetLowering *getTLI() const { return TLI; }
29 
30 public:
31  explicit MipsTTIImpl(const MipsTargetMachine *TM, const Function &F)
32  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
33  TLI(ST->getTargetLowering()) {}
34 
35  bool hasDivRemOp(Type *DataType, bool IsSigned);
36 };
37 
38 } // end namespace llvm
39 
40 #endif
llvm::MipsTargetMachine
Definition: MipsTargetMachine.h:27
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::Function
Definition: Function.h:60
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:172
llvm::MipsTTIImpl::hasDivRemOp
bool hasDivRemOp(Type *DataType, bool IsSigned)
Definition: MipsTargetTransformInfo.cpp:13
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
MipsTargetMachine.h
llvm::MipsTTIImpl
Definition: MipsTargetTransformInfo.h:18
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::TargetTransformInfoImplBase::getDataLayout
const DataLayout & getDataLayout() const
Definition: TargetTransformInfoImpl.h:46
llvm::MipsTTIImpl::MipsTTIImpl
MipsTTIImpl(const MipsTargetMachine *TM, const Function &F)
Definition: MipsTargetTransformInfo.h:31
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
llvm::MipsSubtarget
Definition: MipsSubtarget.h:39
llvm::MipsTargetLowering
Definition: MipsISelLowering.h:264
TargetTransformInfo.h
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
BasicTTIImpl.h