LLVM API Documentation

Defines | Functions
MachineCopyPropagation.cpp File Reference
#include "llvm/CodeGen/Passes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Include dependency graph for MachineCopyPropagation.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "codegen-cp"

Functions

 STATISTIC (NumDeletes,"Number of dead copies deleted")
 INITIALIZE_PASS (MachineCopyPropagation,"machine-cp","Machine Copy Propagation Pass", false, false) void MachineCopyPropagation
static bool NoInterveningSideEffect (const MachineInstr *CopyMI, const MachineInstr *MI)
static bool isNopCopy (MachineInstr *CopyMI, unsigned Def, unsigned Src, const TargetRegisterInfo *TRI)

Define Documentation

#define DEBUG_TYPE   "codegen-cp"

Definition at line 31 of file MachineCopyPropagation.cpp.


Function Documentation

INITIALIZE_PASS ( MachineCopyPropagation  ,
"machine-cp"  ,
"Machine Copy Propagation Pass ,
false  ,
false   
)
static bool isNopCopy ( MachineInstr CopyMI,
unsigned  Def,
unsigned  Src,
const TargetRegisterInfo TRI 
) [static]

isNopCopy - Return true if the specified copy is really a nop. That is if the source of the copy is the same of the definition of the copy that supplied the source. If the source of the copy is a sub-register than it must check the sub-indices match. e.g. ecx = mov eax al = mov cl But not ecx = mov eax al = mov ch

Definition at line 115 of file MachineCopyPropagation.cpp.

References llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MCRegisterInfo::getSubRegIndex(), and llvm::MCRegisterInfo::isSubRegister().

static bool NoInterveningSideEffect ( const MachineInstr CopyMI,
const MachineInstr MI 
) [static]
STATISTIC ( NumDeletes  ,
"Number of dead copies deleted"   
)