LLVM  5.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 "AMDGPUAliasAnalysis.h"
#include "AMDGPUCallLowering.h"
#include "AMDGPUInstructionSelector.h"
#include "AMDGPULegalizerInfo.h"
#include "AMDGPUMacroFusion.h"
#include "AMDGPUTargetObjectFile.h"
#include "AMDGPUTargetTransformInfo.h"
#include "GCNIterativeScheduler.h"
#include "GCNSchedStrategy.h"
#include "R600MachineScheduler.h"
#include "SIMachineScheduler.h"
#include "llvm/CodeGen/GlobalISel/IRTranslator.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelect.h"
#include "llvm/CodeGen/GlobalISel/Legalizer.h"
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.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/Support/TargetRegistry.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Vectorize.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 ScheduleDAGInstrs * createR600MachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrs * createSIMachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrs * createGCNMaxOccupancyMachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrs * createIterativeGCNMaxOccupancyMachineScheduler (MachineSchedContext *C)
 
static ScheduleDAGInstrs * createMinRegScheduler (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)
 
static ImmutablePass * createAMDGPUExternalAAWrapperPass ()
 

Variables

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 cl::opt< bool > EnableEarlyIfConversion ("amdgpu-early-ifcvt", cl::Hidden, cl::desc("Run early if-conversion"), cl::init(false))
 
static cl::opt< bool > EnableR600IfConvert ("r600-if-convert", cl::desc("Use if conversion pass"), cl::ReallyHidden, cl::init(true))
 
static cl::opt< bool > EnableLoadStoreVectorizer ("amdgpu-load-store-vectorizer", cl::desc("Enable load store vectorizer"), cl::init(true), cl::Hidden)
 
static cl::opt< bool > ScalarizeGlobal ("amdgpu-scalarize-global-loads", cl::desc("Enable global load scalarization"), cl::init(true), cl::Hidden)
 
static cl::opt< bool > InternalizeSymbols ("amdgpu-internalize-symbols", cl::desc("Enable elimination of non-kernel functions and unused globals"), cl::init(false), cl::Hidden)
 
static cl::opt< bool > EarlyInlineAll ("amdgpu-early-inline-all", cl::desc("Inline all functions early"), cl::init(false), cl::Hidden)
 
static cl::opt< bool > EnableSDWAPeephole ("amdgpu-sdwa-peephole", cl::desc("Enable SDWA peepholer"), cl::init(true))
 
static cl::opt< bool > EnableAMDGPUAliasAnalysis ("enable-amdgpu-aa", cl::Hidden, cl::desc("Enable AMDGPU Alias Analysis"), cl::init(true))
 
static cl::opt< bool > EnableSIInsertWaitcntsPass ("enable-si-insert-waitcnts", cl::desc("Use new waitcnt insertion pass"), cl::init(true))
 
static cl::opt< bool > LateCFGStructurize ("amdgpu-late-structurize", cl::desc("Enable late CFG structurization"), 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)
 
static MachineSchedRegistry IterativeGCNMaxOccupancySchedRegistry ("gcn-max-occupancy-experimental","Run GCN scheduler to maximize occupancy (experimental)", createIterativeGCNMaxOccupancyMachineScheduler)
 
static MachineSchedRegistry GCNMinRegSchedRegistry ("gcn-minreg","Run GCN iterative scheduler for minimal register usage (experimental)", createMinRegScheduler)
 

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
static ImmutablePass* createAMDGPUExternalAAWrapperPass ( )
static
static ScheduleDAGInstrs* createGCNMaxOccupancyMachineScheduler ( MachineSchedContext *  C)
static
static ScheduleDAGInstrs* createIterativeGCNMaxOccupancyMachineScheduler ( MachineSchedContext *  C)
static
static ScheduleDAGInstrs* createMinRegScheduler ( MachineSchedContext *  C)
static
static ScheduleDAGInstrs* createR600MachineScheduler ( MachineSchedContext *  C)
static

Definition at line 163 of file AMDGPUTargetMachine.cpp.

static ScheduleDAGInstrs* createSIMachineScheduler ( MachineSchedContext *  C)
static

Definition at line 167 of file AMDGPUTargetMachine.cpp.

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

Definition at line 159 of file AMDGPUTargetMachine.cpp.

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

Definition at line 249 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> EarlyInlineAll("amdgpu-early-inline-all", cl::desc("Inline all functions early"), cl::init(false), cl::Hidden)
static
cl::opt<bool> EnableAMDGPUAliasAnalysis("enable-amdgpu-aa", cl::Hidden, cl::desc("Enable AMDGPU Alias Analysis"), cl::init(true))
static
cl::opt<bool> EnableEarlyIfConversion("amdgpu-early-ifcvt", cl::Hidden, cl::desc("Run early if-conversion"), cl::init(false))
static
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> EnableSDWAPeephole("amdgpu-sdwa-peephole", cl::desc("Enable SDWA peepholer"), cl::init(true))
static
cl::opt<bool> EnableSIInsertWaitcntsPass("enable-si-insert-waitcnts", cl::desc("Use new waitcnt insertion 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 GCNMinRegSchedRegistry("gcn-minreg","Run GCN iterative scheduler for minimal register usage (experimental)", createMinRegScheduler)
static
cl::opt<bool> InternalizeSymbols("amdgpu-internalize-symbols", cl::desc("Enable elimination of non-kernel functions and unused globals"), cl::init(false), cl::Hidden)
static
MachineSchedRegistry IterativeGCNMaxOccupancySchedRegistry("gcn-max-occupancy-experimental","Run GCN scheduler to maximize occupancy (experimental)", createIterativeGCNMaxOccupancyMachineScheduler)
static
cl::opt<bool> LateCFGStructurize("amdgpu-late-structurize", cl::desc("Enable late CFG structurization"), cl::init(false), cl::Hidden)
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(true), cl::Hidden)
static
MachineSchedRegistry SISchedRegistry("si","Run SI's custom scheduler", createSIMachineScheduler)
static