LLVM  3.7.0
AMDGPUTargetMachine.h
Go to the documentation of this file.
1 //===-- AMDGPUTargetMachine.h - AMDGPU TargetMachine Interface --*- 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 //
10 /// \file
11 /// \brief The AMDGPU TargetMachine interface definition for hw codgen targets.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_R600_AMDGPUTARGETMACHINE_H
16 #define LLVM_LIB_TARGET_R600_AMDGPUTARGETMACHINE_H
17 
18 #include "AMDGPUFrameLowering.h"
19 #include "AMDGPUInstrInfo.h"
20 #include "AMDGPUIntrinsicInfo.h"
21 #include "AMDGPUSubtarget.h"
22 #include "R600ISelLowering.h"
23 #include "llvm/IR/DataLayout.h"
24 
25 namespace llvm {
26 
27 //===----------------------------------------------------------------------===//
28 // AMDGPU Target Machine (R600+)
29 //===----------------------------------------------------------------------===//
30 
32 private:
33 
34 protected:
38 
39 public:
40  AMDGPUTargetMachine(const Target &T, const Triple &TT, StringRef FS,
44 
45  const AMDGPUSubtarget *getSubtargetImpl() const { return &Subtarget; }
46  const AMDGPUSubtarget *getSubtargetImpl(const Function &) const override {
47  return &Subtarget;
48  }
49  const AMDGPUIntrinsicInfo *getIntrinsicInfo() const override {
50  return &IntrinsicInfo;
51  }
53 
55  return TLOF;
56  }
57 };
58 
59 //===----------------------------------------------------------------------===//
60 // R600 Target Machine (R600 -> Cayman)
61 //===----------------------------------------------------------------------===//
62 
64 
65 public:
66  R600TargetMachine(const Target &T, const Triple &TT, StringRef FS,
69 
70  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
71 };
72 
73 //===----------------------------------------------------------------------===//
74 // GCN Target Machine (SI+)
75 //===----------------------------------------------------------------------===//
76 
78 
79 public:
80  GCNTargetMachine(const Target &T, const Triple &TT, StringRef FS,
83 
84  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
85 };
86 
87 } // End namespace llvm
88 
89 #endif
AMDGPU specific subclass of TargetSubtarget.
const AMDGPUSubtarget * getSubtargetImpl() const
TargetLoweringObjectFile * TLOF
Analysis pass providing the TargetTransformInfo.
Interface to describe a layout of a stack frame on a AMDIL target machine.
Target-Independent Code Generator Pass Configuration Options.
AMDGPUIntrinsicInfo IntrinsicInfo
AMDGPUTargetMachine(const Target &T, const Triple &TT, StringRef FS, StringRef CPU, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
R600TargetMachine(const Target &T, const Triple &TT, StringRef FS, StringRef CPU, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
GCNTargetMachine(const Target &T, const Triple &TT, StringRef FS, StringRef CPU, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Target - Wrapper for Target specific information.
Interface for the AMDGPU Implementation of the Intrinsic Info class.
Contains the definition of a TargetInstrInfo class that is common to all AMD GPUs.
const AMDGPUSubtarget * getSubtargetImpl(const Function &) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...
TargetLoweringObjectFile * getObjFileLowering() const override
R600 DAG Lowering interface definition.
TargetIRAnalysis getTargetIRAnalysis() override
Get a TargetIRAnalysis implementation for the target.
const AMDGPUIntrinsicInfo * getIntrinsicInfo() const override
If intrinsic information is available, return it. If not, return null.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...