LLVM  8.0.1
Macros | Functions | Variables
SIFormMemoryClauses.cpp File Reference

This pass creates bundles of SMEM and VMEM instructions forming memory clauses if XNACK is enabled. More...

#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "GCNRegPressure.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
Include dependency graph for SIFormMemoryClauses.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-form-memory-clauses"
 

Functions

 INITIALIZE_PASS_BEGIN (SIFormMemoryClauses, DEBUG_TYPE, "SI Form memory clauses", false, false) INITIALIZE_PASS_END(SIFormMemoryClauses
 
static bool isVMEMClauseInst (const MachineInstr &MI)
 
static bool isSMEMClauseInst (const MachineInstr &MI)
 
static bool isValidClauseInst (const MachineInstr &MI, bool IsVMEMClause)
 
static unsigned getMopState (const MachineOperand &MO)
 

Variables

static cl::opt< unsignedMaxClause ("amdgpu-max-memory-clause", cl::Hidden, cl::init(15), cl::desc("Maximum length of a memory clause, instructions"))
 
 DEBUG_TYPE
 
SI Form memory clauses
 
SI Form memory false
 

Detailed Description

This pass creates bundles of SMEM and VMEM instructions forming memory clauses if XNACK is enabled.

Def operands of clauses are marked as early clobber to make sure we will not override any source within a clause.

Definition in file SIFormMemoryClauses.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "si-form-memory-clauses"

Definition at line 30 of file SIFormMemoryClauses.cpp.

Function Documentation

◆ getMopState()

static unsigned getMopState ( const MachineOperand MO)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( SIFormMemoryClauses  ,
DEBUG_TYPE  ,
"SI Form memory clauses ,
false  ,
false   
)

◆ isSMEMClauseInst()

static bool isSMEMClauseInst ( const MachineInstr MI)
static

Definition at line 104 of file SIFormMemoryClauses.cpp.

References llvm::SIInstrInfo::isSMRD().

Referenced by isValidClauseInst().

◆ isValidClauseInst()

static bool isValidClauseInst ( const MachineInstr MI,
bool  IsVMEMClause 
)
static

◆ isVMEMClauseInst()

static bool isVMEMClauseInst ( const MachineInstr MI)
static

Variable Documentation

◆ clauses

SI Form memory clauses

Definition at line 88 of file SIFormMemoryClauses.cpp.

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 88 of file SIFormMemoryClauses.cpp.

◆ false

SI Form memory false

Definition at line 88 of file SIFormMemoryClauses.cpp.

◆ MaxClause

cl::opt<unsigned> MaxClause("amdgpu-max-memory-clause", cl::Hidden, cl::init(15), cl::desc("Maximum length of a memory clause, instructions"))
static

Referenced by getMopState().