LLVM 24.0.0git
PHIElimination.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "phi-node-elimination"

Functions

 STATISTIC (NumLowered, "Number of phis lowered")
 STATISTIC (NumCriticalEdgesSplit, "Number of critical edges split")
 STATISTIC (NumReused, "Number of reused lowered phis")
 INITIALIZE_PASS_BEGIN (PHIElimination, DEBUG_TYPE, "Eliminate PHI nodes for register allocation", false, false) INITIALIZE_PASS_END(PHIElimination
static void moveDebugInstructionsAfter (MachineBasicBlock &MBB, MachineBasicBlock::iterator Position)
 Move debug instructions preceding Position to immediately after it.
static bool isImplicitlyDefined (Register VirtReg, const MachineRegisterInfo &MRI)
 Return true if all defs of VirtReg are implicit-defs.
static bool allPhiOperandsUndefined (const MachineInstr &MPhi, const MachineRegisterInfo &MRI)
 Return true if all sources of the phi node are implicit_def's, or undef's.

Variables

 DEBUG_TYPE
Eliminate PHI nodes for register allocation
Eliminate PHI nodes for register false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "phi-node-elimination"

Definition at line 54 of file PHIElimination.cpp.

Function Documentation

◆ allPhiOperandsUndefined()

bool allPhiOperandsUndefined ( const MachineInstr & MPhi,
const MachineRegisterInfo & MRI )
static

Return true if all sources of the phi node are implicit_def's, or undef's.

Definition at line 344 of file PHIElimination.cpp.

References E(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), I, isImplicitlyDefined(), llvm::MachineOperand::isUndef(), and MRI.

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( PHIElimination ,
DEBUG_TYPE ,
"Eliminate PHI nodes for register allocation" ,
false ,
false  )

◆ isImplicitlyDefined()

bool isImplicitlyDefined ( Register VirtReg,
const MachineRegisterInfo & MRI )
static

Return true if all defs of VirtReg are implicit-defs.

This includes registers with no defs.

Definition at line 335 of file PHIElimination.cpp.

References MRI.

Referenced by allPhiOperandsUndefined().

◆ moveDebugInstructionsAfter()

void moveDebugInstructionsAfter ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator Position )
static

Move debug instructions preceding Position to immediately after it.

Definition at line 283 of file PHIElimination.cpp.

References I, InsertPt, MBB, and llvm::skipDebugInstructionsForward().

◆ STATISTIC() [1/3]

STATISTIC ( NumCriticalEdgesSplit ,
"Number of critical edges split"  )

◆ STATISTIC() [2/3]

STATISTIC ( NumLowered ,
"Number of phis lowered"  )

◆ STATISTIC() [3/3]

STATISTIC ( NumReused ,
"Number of reused lowered phis"  )

Variable Documentation

◆ allocation

Eliminate PHI nodes for register allocation

Definition at line 202 of file PHIElimination.cpp.

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 201 of file PHIElimination.cpp.

◆ false

Eliminate PHI nodes for register false

Definition at line 202 of file PHIElimination.cpp.