LLVM  4.0.0
Functions | Variables
AMDGPUTargetMachine.cpp File Reference

The AMDGPU target machine contains all of the hardware specific information needed to emit code for R600 and SI GPUs. More...

#include "AMDGPUTargetMachine.h"
#include "AMDGPU.h"
#include "AMDGPUCallLowering.h"
#include "AMDGPUTargetObjectFile.h"
#include "AMDGPUTargetTransformInfo.h"
#include "GCNSchedStrategy.h"
#include "R600MachineScheduler.h"
#include "SIMachineScheduler.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
#include "llvm/CodeGen/GlobalISel/IRTranslator.h"
#include "llvm/CodeGen/MachineScheduler.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Vectorize.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include <memory>
Include dependency graph for AMDGPUTargetMachine.cpp:

Go to the source code of this file.

Functions

void LLVMInitializeAMDGPUTarget ()
 
static std::unique_ptr
< TargetLoweringObjectFile
createTLOF (const Triple &TT)
 
static ScheduleDAGInstrscreateR600MachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrscreateSIMachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrscreateGCNMaxOccupancyMachineScheduler (MachineSchedContext *C)
 
static StringRef computeDataLayout (const Triple &TT)
 
static LLVM_READNONE StringRef getGPUOrDefault (const Triple &TT, StringRef GPU)
 
static Reloc::Model getEffectiveRelocModel (Optional< Reloc::Model > RM)
 

Variables

static cl::opt< boolEnableR600StructurizeCFG ("r600-ir-structurize", cl::desc("Use StructurizeCFG IR pass"), cl::init(true))
 
static cl::opt< boolEnableSROA ("amdgpu-sroa", cl::desc("Run SROA after promote alloca pass"), cl::ReallyHidden, cl::init(true))
 
static cl::opt< boolEnableR600IfConvert ("r600-if-convert", cl::desc("Use if conversion pass"), cl::ReallyHidden, cl::init(true))
 
static cl::opt< boolEnableLoadStoreVectorizer ("amdgpu-load-store-vectorizer", cl::desc("Enable load store vectorizer"), cl::init(true), cl::Hidden)
 
static cl::opt< boolScalarizeGlobal ("amdgpu-scalarize-global-loads", cl::desc("Enable global load scalarization"), cl::init(false), cl::Hidden)
 
static MachineSchedRegistry R600SchedRegistry ("r600","Run R600's custom scheduler", createR600MachineScheduler)
 
static MachineSchedRegistry SISchedRegistry ("si","Run SI's custom scheduler", createSIMachineScheduler)
 
static MachineSchedRegistry GCNMaxOccupancySchedRegistry ("gcn-max-occupancy","Run GCN scheduler to maximize occupancy", createGCNMaxOccupancyMachineScheduler)
 

Detailed Description

The AMDGPU target machine contains all of the hardware specific information needed to emit code for R600 and SI GPUs.

Definition in file AMDGPUTargetMachine.cpp.

Function Documentation

static StringRef computeDataLayout ( const Triple TT)
static

Definition at line 142 of file AMDGPUTargetMachine.cpp.

References llvm::Triple::getArch(), and llvm::Triple::r600.

static ScheduleDAGInstrs* createGCNMaxOccupancyMachineScheduler ( MachineSchedContext C)
static
static ScheduleDAGInstrs* createR600MachineScheduler ( MachineSchedContext C)
static

Definition at line 111 of file AMDGPUTargetMachine.cpp.

static ScheduleDAGInstrs* createSIMachineScheduler ( MachineSchedContext C)
static

Definition at line 115 of file AMDGPUTargetMachine.cpp.

static std::unique_ptr<TargetLoweringObjectFile> createTLOF ( const Triple TT)
static

Definition at line 107 of file AMDGPUTargetMachine.cpp.

static Reloc::Model getEffectiveRelocModel ( Optional< Reloc::Model RM)
static

Definition at line 168 of file AMDGPUTargetMachine.cpp.

References llvm::Reloc::PIC_.

static LLVM_READNONE StringRef getGPUOrDefault ( const Triple TT,
StringRef  GPU 
)
static
void LLVMInitializeAMDGPUTarget ( )

Variable Documentation

cl::opt<bool> EnableLoadStoreVectorizer("amdgpu-load-store-vectorizer", cl::desc("Enable load store vectorizer"), cl::init(true), cl::Hidden)
static
cl::opt<bool> EnableR600IfConvert("r600-if-convert", cl::desc("Use if conversion pass"), cl::ReallyHidden, cl::init(true))
static
cl::opt<bool> EnableR600StructurizeCFG("r600-ir-structurize", cl::desc("Use StructurizeCFG IR pass"), cl::init(true))
static
cl::opt<bool> EnableSROA("amdgpu-sroa", cl::desc("Run SROA after promote alloca pass"), cl::ReallyHidden, cl::init(true))
static
MachineSchedRegistry GCNMaxOccupancySchedRegistry("gcn-max-occupancy","Run GCN scheduler to maximize occupancy", createGCNMaxOccupancyMachineScheduler)
static
MachineSchedRegistry R600SchedRegistry("r600","Run R600's custom scheduler", createR600MachineScheduler)
static
cl::opt<bool> ScalarizeGlobal("amdgpu-scalarize-global-loads", cl::desc("Enable global load scalarization"), cl::init(false), cl::Hidden)
static
MachineSchedRegistry SISchedRegistry("si","Run SI's custom scheduler", createSIMachineScheduler)
static