LLVM 23.0.0git
SparcTargetTransformInfo.h
Go to the documentation of this file.
1//===-- SparcTargetTransformInfo.cpp - SPARC 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/// \file
9/// This file a TargetTransformInfoImplBase conforming object specific to the
10/// SPARC target machine. It uses the target's detailed information to
11/// provide more precise answers to certain TTI queries, while letting the
12/// target independent and default TTI implementations handle the rest.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETTRANSFORMINFO_H
17#define LLVM_LIB_TARGET_SPARC_SPARCTARGETTRANSFORMINFO_H
18
19#include "SparcTargetMachine.h"
22
23namespace llvm {
24
25class SparcTTIImpl final : public BasicTTIImplBase<SparcTTIImpl> {
27 typedef TargetTransformInfo TTI;
28 friend BaseT;
29
30 const SparcSubtarget *ST;
31 const SparcTargetLowering *TLI;
32
33 const SparcSubtarget *getST() const { return ST; }
34 const SparcTargetLowering *getTLI() const { return TLI; }
35
36public:
37 explicit SparcTTIImpl(const SparcTargetMachine *TM, const Function &F)
38 : BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl(F)),
39 TLI(ST->getTargetLowering()) {}
40
41 /// \name Scalar TTI Implementations
42 /// @{
43
44 TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) const override;
45 /// @}
46};
47
48} // end namespace llvm
49
50#endif
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:54
This pass exposes codegen information to IR-level passes.
BasicTTIImplBase(const TargetMachine *TM, const DataLayout &DL)
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) const override
SparcTTIImpl(const SparcTargetMachine *TM, const Function &F)
virtual const DataLayout & getDataLayout() const
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
PopcntSupportKind
Flags indicating the kind of support for population count.
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26