LLVM  3.7.0
Namespaces | Macros | Functions | Variables
SIShrinkInstructions.cpp File Reference
#include "AMDGPU.h"
#include "AMDGPUMCInstLower.h"
#include "AMDGPUSubtarget.h"
#include "SIInstrInfo.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for SIShrinkInstructions.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "si-shrink-instructions"
 The pass tries to use the 32-bit encoding for instructions when possible. More...
 

Functions

 STATISTIC (NumInstructionsShrunk,"Number of 64-bit instruction reduced to 32-bit.")
 
 STATISTIC (NumLiteralConstantsFolded,"Number of literal constants folded into 32-bit instructions.")
 
void llvm::initializeSIShrinkInstructionsPass (PassRegistry &)
 
 INITIALIZE_PASS_BEGIN (SIShrinkInstructions, DEBUG_TYPE,"SI Lower il Copies", false, false) INITIALIZE_PASS_END(SIShrinkInstructions
 
static bool isVGPR (const MachineOperand *MO, const SIRegisterInfo &TRI, const MachineRegisterInfo &MRI)
 
static bool canShrink (MachineInstr &MI, const SIInstrInfo *TII, const SIRegisterInfo &TRI, const MachineRegisterInfo &MRI)
 
static void foldImmediates (MachineInstr &MI, const SIInstrInfo *TII, MachineRegisterInfo &MRI, bool TryToCommute=true)
 This function checks MI for operands defined by a move immediate instruction and then folds the literal constant into the instruction if it can. More...
 

Variables

 DEBUG_TYPE
 
SI Lower il Copies
 
SI Lower il false
 

Macro Definition Documentation

#define DEBUG_TYPE   "si-shrink-instructions"

The pass tries to use the 32-bit encoding for instructions when possible.

Definition at line 27 of file SIShrinkInstructions.cpp.

Function Documentation

static bool canShrink ( MachineInstr MI,
const SIInstrInfo TII,
const SIRegisterInfo TRI,
const MachineRegisterInfo MRI 
)
static
static void foldImmediates ( MachineInstr MI,
const SIInstrInfo TII,
MachineRegisterInfo MRI,
bool  TryToCommute = true 
)
static
INITIALIZE_PASS_BEGIN ( SIShrinkInstructions  ,
DEBUG_TYPE  ,
"SI Lower il Copies ,
false  ,
false   
)
static bool isVGPR ( const MachineOperand MO,
const SIRegisterInfo TRI,
const MachineRegisterInfo MRI 
)
static
STATISTIC ( NumInstructionsShrunk  ,
"Number of 64-bit instruction reduced to 32-bit."   
)
STATISTIC ( NumLiteralConstantsFolded  ,
"Number of literal constants folded into 32-bit instructions."   
)

Variable Documentation

SI Lower il Copies

Definition at line 66 of file SIShrinkInstructions.cpp.

DEBUG_TYPE

Definition at line 66 of file SIShrinkInstructions.cpp.

SI Lower il false

Definition at line 66 of file SIShrinkInstructions.cpp.