LLVM API Documentation

Defines | Functions | Variables
PHIElimination.cpp File Reference
#include "llvm/CodeGen/Passes.h"
#include "PHIEliminationUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/LiveVariables.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
Include dependency graph for PHIElimination.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "phielim"

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,"phi-node-elimination","Eliminate PHI nodes for register allocation", false, false) INITIALIZE_PASS_END(PHIElimination
static bool isImplicitlyDefined (unsigned VirtReg, const MachineRegisterInfo *MRI)
static bool isSourceDefinedByImplicitDef (const MachineInstr *MPhi, const MachineRegisterInfo *MRI)

Variables

static cl::opt< boolDisableEdgeSplitting ("disable-phi-elim-edge-splitting", cl::init(false), cl::Hidden, cl::desc("Disable critical edge splitting ""during PHI elimination"))
static cl::opt< boolSplitAllCriticalEdges ("phi-elim-split-all-critical-edges", cl::init(false), cl::Hidden, cl::desc("Split all critical edges during ""PHI elimination"))
phi node elimination
phi node Eliminate PHI nodes
for register 
allocation
phi node Eliminate PHI nodes
for register 
false

Define Documentation

#define DEBUG_TYPE   "phielim"

Definition at line 38 of file PHIElimination.cpp.


Function Documentation

INITIALIZE_PASS_BEGIN ( PHIElimination  ,
"phi-node-elimination ,
"Eliminate PHI nodes for register allocation ,
false  ,
false   
)
static bool isImplicitlyDefined ( unsigned  VirtReg,
const MachineRegisterInfo MRI 
) [static]

isImplicitlyDefined - Return true if all defs of VirtReg are implicit-defs. This includes registers with no defs.

Definition at line 199 of file PHIElimination.cpp.

References llvm::MachineRegisterInfo::def_instructions().

Referenced by isSourceDefinedByImplicitDef().

isSourceDefinedByImplicitDef - Return true if all sources of the phi node are implicit_def's.

Definition at line 209 of file PHIElimination.cpp.

References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and isImplicitlyDefined().

STATISTIC ( NumLowered  ,
"Number of phis lowered"   
)
STATISTIC ( NumCriticalEdgesSplit  ,
"Number of critical edges split  
)
STATISTIC ( NumReused  ,
"Number of reused lowered phis"   
)

Variable Documentation

phi node Eliminate PHI nodes for register allocation

Definition at line 116 of file PHIElimination.cpp.

cl::opt<bool> DisableEdgeSplitting("disable-phi-elim-edge-splitting", cl::init(false), cl::Hidden, cl::desc("Disable critical edge splitting ""during PHI elimination")) [static]
phi node elimination

Definition at line 116 of file PHIElimination.cpp.

phi node Eliminate PHI nodes for register false

Definition at line 116 of file PHIElimination.cpp.

cl::opt<bool> SplitAllCriticalEdges("phi-elim-split-all-critical-edges", cl::init(false), cl::Hidden, cl::desc("Split all critical edges during ""PHI elimination")) [static]