LLVM API Documentation

AMDGPUTargetMachine.h
Go to the documentation of this file.
00001 //===-- AMDGPUTargetMachine.h - AMDGPU TargetMachine Interface --*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 /// \file
00011 /// \brief The AMDGPU TargetMachine interface definition for hw codgen targets.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef LLVM_LIB_TARGET_R600_AMDGPUTARGETMACHINE_H
00016 #define LLVM_LIB_TARGET_R600_AMDGPUTARGETMACHINE_H
00017 
00018 #include "AMDGPUFrameLowering.h"
00019 #include "AMDGPUInstrInfo.h"
00020 #include "AMDGPUIntrinsicInfo.h"
00021 #include "AMDGPUSubtarget.h"
00022 #include "R600ISelLowering.h"
00023 #include "llvm/IR/DataLayout.h"
00024 
00025 namespace llvm {
00026 
00027 class AMDGPUTargetMachine : public LLVMTargetMachine {
00028   AMDGPUSubtarget Subtarget;
00029   AMDGPUIntrinsicInfo IntrinsicInfo;
00030 
00031 public:
00032   AMDGPUTargetMachine(const Target &T, StringRef TT, StringRef FS,
00033                       StringRef CPU, TargetOptions Options, Reloc::Model RM,
00034                       CodeModel::Model CM, CodeGenOpt::Level OL);
00035   ~AMDGPUTargetMachine();
00036   const AMDGPUSubtarget *getSubtargetImpl() const override {
00037     return &Subtarget;
00038   }
00039   const AMDGPUIntrinsicInfo *getIntrinsicInfo() const override {
00040     return &IntrinsicInfo;
00041   }
00042   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
00043 
00044   /// \brief Register R600 analysis passes with a pass manager.
00045   void addAnalysisPasses(PassManagerBase &PM) override;
00046 };
00047 
00048 } // End namespace llvm
00049 
00050 #endif