LLVM  4.0.0
Macros | Functions | Variables
SIOptimizeExecMasking.cpp File Reference
#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "SIInstrInfo.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"
Include dependency graph for SIOptimizeExecMasking.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-optimize-exec-masking"
 

Functions

 INITIALIZE_PASS_BEGIN (SIOptimizeExecMasking, DEBUG_TYPE,"SI optimize exec mask operations", false, false) INITIALIZE_PASS_END(SIOptimizeExecMasking
 
static unsigned isCopyFromExec (const MachineInstr &MI)
 If MI is a copy from exec, return the register copied to. More...
 
static unsigned isCopyToExec (const MachineInstr &MI)
 If MI is a copy to exec, return the register copied from. More...
 
static unsigned getSaveExecOp (unsigned Opc)
 
static bool removeTerminatorBit (const SIInstrInfo &TII, MachineInstr &MI)
 
static
MachineBasicBlock::reverse_iterator 
fixTerminators (const SIInstrInfo &TII, MachineBasicBlock &MBB)
 
static
MachineBasicBlock::reverse_iterator 
findExecCopy (const SIInstrInfo &TII, MachineBasicBlock &MBB, MachineBasicBlock::reverse_iterator I, unsigned CopyToExec)
 
static bool isLiveOut (const MachineBasicBlock &MBB, unsigned Reg)
 

Variables

 DEBUG_TYPE
 
SI optimize exec mask operations
 
SI optimize exec mask false
 

Macro Definition Documentation

#define DEBUG_TYPE   "si-optimize-exec-masking"

Definition at line 21 of file SIOptimizeExecMasking.cpp.

Function Documentation

static MachineBasicBlock::reverse_iterator findExecCopy ( const SIInstrInfo TII,
MachineBasicBlock MBB,
MachineBasicBlock::reverse_iterator  I,
unsigned  CopyToExec 
)
static

Definition at line 154 of file SIOptimizeExecMasking.cpp.

References E, I, isCopyFromExec(), N, and llvm::MachineBasicBlock::rend().

static MachineBasicBlock::reverse_iterator fixTerminators ( const SIInstrInfo TII,
MachineBasicBlock MBB 
)
static
static unsigned getSaveExecOp ( unsigned  Opc)
static

Definition at line 90 of file SIOptimizeExecMasking.cpp.

INITIALIZE_PASS_BEGIN ( SIOptimizeExecMasking  ,
DEBUG_TYPE  ,
"SI optimize exec mask operations ,
false  ,
false   
)
static unsigned isCopyFromExec ( const MachineInstr MI)
static

If MI is a copy from exec, return the register copied to.

Definition at line 59 of file SIOptimizeExecMasking.cpp.

References llvm::MachineOperand::getReg(), and llvm::MachineOperand::isReg().

Referenced by findExecCopy().

static unsigned isCopyToExec ( const MachineInstr MI)
static

If MI is a copy to exec, return the register copied from.

Definition at line 74 of file SIOptimizeExecMasking.cpp.

References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), and llvm_unreachable.

static bool isLiveOut ( const MachineBasicBlock MBB,
unsigned  Reg 
)
static
static bool removeTerminatorBit ( const SIInstrInfo TII,
MachineInstr MI 
)
static

Variable Documentation

DEBUG_TYPE

Definition at line 51 of file SIOptimizeExecMasking.cpp.

SI optimize exec mask false

Definition at line 51 of file SIOptimizeExecMasking.cpp.

SI optimize exec mask operations

Definition at line 51 of file SIOptimizeExecMasking.cpp.