LLVM  15.0.0git
Macros | Functions | Variables
RISCVRedundantCopyElimination.cpp File Reference
#include "RISCV.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"
Include dependency graph for RISCVRedundantCopyElimination.cpp:

Go to the source code of this file.


#define DEBUG_TYPE   "riscv-copyelim"


 STATISTIC (NumCopiesRemoved, "Number of copies removed.")
 INITIALIZE_PASS (RISCVRedundantCopyElimination, "riscv-copyelim", "RISCV redundant copy elimination pass", false, false) static bool guaranteesZeroRegInBlock(const MachineInstr &MI
 if (Opc==RISCV::BEQ &&MI.getOperand(1).getReg()==RISCV::X0 &&&MBB==MI.getOperand(2).getMBB()) return true


const MachineBasicBlockMBB
return false

Macro Definition Documentation


#define DEBUG_TYPE   "riscv-copyelim"

Definition at line 34 of file RISCVRedundantCopyElimination.cpp.

Function Documentation

◆ if()

if ( Opc  = =RISCV::BEQ &&MI.getOperand(1).getReg()==RISCV::X0 &&&MBB==MI.getOperand(2).getMBB())


INITIALIZE_PASS ( RISCVRedundantCopyElimination  ,
"riscv-copyelim"  ,
"RISCV redundant copy elimination pass ,
false  ,
) const &


STATISTIC ( NumCopiesRemoved  ,
"Number of copies removed."   

Variable Documentation

◆ false

return false

Definition at line 81 of file RISCVRedundantCopyElimination.cpp.


Initial value:
unsigned Opc = MI.getOpcode()

Definition at line 72 of file RISCVRedundantCopyElimination.cpp.

IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:104