LLVM  10.0.0
VETargetTransformInfo.h
Go to the documentation of this file.
1 //===- VETargetTransformInfo.h - VE 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 TargetTransformInfo::Concept conforming object specific to the
10 /// VE 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_VE_VETARGETTRANSFORMINFO_H
17 #define LLVM_LIB_TARGET_VE_VETARGETTRANSFORMINFO_H
18 
19 #include "VE.h"
20 #include "VETargetMachine.h"
23 
24 namespace llvm {
25 
26 class VETTIImpl : public BasicTTIImplBase<VETTIImpl> {
28  friend BaseT;
29 
30  const VESubtarget *ST;
31  const VETargetLowering *TLI;
32 
33  const VESubtarget *getST() const { return ST; }
34  const VETargetLowering *getTLI() const { return TLI; }
35 
36 public:
37  explicit VETTIImpl(const VETargetMachine *TM, const Function &F)
38  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
39  TLI(ST->getTargetLowering()) {}
40 
41  unsigned getNumberOfRegisters(unsigned ClassID) const { return 64; }
42 
43  unsigned getRegisterBitWidth(bool Vector) const { return 64; }
44 
45  unsigned getMinVectorRegisterBitWidth() const { return 64; }
46 };
47 
48 } // namespace llvm
49 
50 #endif // LLVM_LIB_TARGET_VE_VETARGETTRANSFORMINFO_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
F(f)
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:77
unsigned getMinVectorRegisterBitWidth() const
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
unsigned getNumberOfRegisters(unsigned ClassID) const
unsigned getRegisterBitWidth(bool Vector) const
static const Function * getParent(const Value *V)
const DataLayout & getDataLayout() const
This pass exposes codegen information to IR-level passes.
VETTIImpl(const VETargetMachine *TM, const Function &F)