LLVM  8.0.1
ARCTargetTransformInfo.h
Go to the documentation of this file.
1 //===- ARCTargetTransformInfo.h - ARC specific TTI --------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 // \file
10 // This file contains a TargetTransformInfo::Concept conforming object specific
11 // to the ARC target machine. It uses the target's detailed information to
12 // provide more precise answers to certain TTI queries, while letting the
13 // target independent and default TTI implementations handle the rest.
14 //
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H
18 #define LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H
19 
20 #include "ARC.h"
23 
24 namespace llvm {
25 
26 class ARCSubtarget;
27 class ARCTargetLowering;
28 class ARCTargetMachine;
29 
30 class ARCTTIImpl : public BasicTTIImplBase<ARCTTIImpl> {
32  friend BaseT;
33 
34  const ARCSubtarget *ST;
35  const ARCTargetLowering *TLI;
36 
37  const ARCSubtarget *getST() const { return ST; }
38  const ARCTargetLowering *getTLI() const { return TLI; }
39 
40 public:
41  explicit ARCTTIImpl(const ARCTargetMachine *TM, const Function &F)
42  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl()),
43  TLI(ST->getTargetLowering()) {}
44 
45  // Provide value semantics. MSVC requires that we spell all of these out.
47  : BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
49  : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),
50  TLI(std::move(Arg.TLI)) {}
51 };
52 
53 } // end namespace llvm
54 
55 #endif // LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
F(f)
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:78
Definition: BitVector.h:938
ARCTTIImpl(const ARCTTIImpl &Arg)
ARCTTIImpl(ARCTTIImpl &&Arg)
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
amdgpu Simplify well known AMD library false Value Value * Arg
ARCTTIImpl(const ARCTargetMachine *TM, const Function &F)
aarch64 promote const
static const Function * getParent(const Value *V)
const DataLayout & getDataLayout() const
This pass exposes codegen information to IR-level passes.