LLVM  4.0.0
Macros | Enumerations | Functions | Variables
SIInsertWaits.cpp File Reference

Insert wait instructions for memory reads and writes. More...

#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "SIDefines.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
Include dependency graph for SIInsertWaits.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-insert-waits"
 

Enumerations

enum  InstType
 

Functions

 INITIALIZE_PASS_BEGIN (SIInsertWaits, DEBUG_TYPE,"SI Insert Waits", false, false) INITIALIZE_PASS_END(SIInsertWaits
 
static bool readsVCCZ (const MachineInstr &MI)
 
static void increaseCounters (Counters &Dst, const Counters &Src)
 helper function for handleOperands More...
 
static bool countersNonZero (const Counters &Counter)
 check whether any of the counters is non-zero More...
 

Variables

 DEBUG_TYPE
 
SI Insert Waits
 
SI Insert false
 

Detailed Description

Insert wait instructions for memory reads and writes.

Memory reads and writes are issued asynchronously, so we need to insert S_WAITCNT instructions when we want to access any of their results or overwrite any register that's used asynchronously.

Definition in file SIInsertWaits.cpp.

Macro Definition Documentation

#define DEBUG_TYPE   "si-insert-waits"

Definition at line 30 of file SIInsertWaits.cpp.

Enumeration Type Documentation

enum InstType

Definition at line 48 of file SIInsertWaits.cpp.

Function Documentation

static bool countersNonZero ( const Counters &  Counter)
static

check whether any of the counters is non-zero

Definition at line 443 of file SIInsertWaits.cpp.

References i.

static void increaseCounters ( Counters &  Dst,
const Counters &  Src 
)
static

helper function for handleOperands

Definition at line 436 of file SIInsertWaits.cpp.

References i.

INITIALIZE_PASS_BEGIN ( SIInsertWaits  ,
DEBUG_TYPE  ,
"SI Insert Waits ,
false  ,
false   
)
static bool readsVCCZ ( const MachineInstr MI)
static

Variable Documentation

DEBUG_TYPE

Definition at line 168 of file SIInsertWaits.cpp.

SI Insert false

Definition at line 168 of file SIInsertWaits.cpp.

SI Insert Waits

Definition at line 168 of file SIInsertWaits.cpp.