LLVM API Documentation

StrongPHIElimination.cpp File Reference

#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterCoalescer.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"

Include dependency graph for StrongPHIElimination.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "strongphielim"

Functions

static bool isLiveIn (unsigned r, MachineBasicBlock *MBB, LiveIntervals &LI)
static bool isLiveOut (unsigned r, MachineBasicBlock *MBB, LiveIntervals &LI)
static bool interferes (unsigned a, unsigned b, MachineBasicBlock *scan, LiveIntervals &LV, unsigned mode)

Variables

static RegisterPass
< StrongPHIElimination > 
X ("strong-phi-node-elimination","Eliminate PHI nodes for register allocation, intelligently")


Define Documentation

#define DEBUG_TYPE   "strongphielim"

Definition at line 22 of file StrongPHIElimination.cpp.


Function Documentation

static bool interferes ( unsigned  a,
unsigned  b,
MachineBasicBlock scan,
LiveIntervals LV,
unsigned  mode 
) [static]

interferes - checks for local interferences by scanning a block. The only trick parameter is 'mode' which tells it the relationship of the two registers. 0 - defined in the same block, 1 - first properly dominates second, 2 - second properly dominates first

Definition at line 317 of file StrongPHIElimination.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::getVRegDef(), and llvm::MachineInstr::killsRegister().

static bool isLiveIn ( unsigned  r,
MachineBasicBlock MBB,
LiveIntervals LI 
) [static]

isLiveIn - helper method that determines, from a regno, if a register is live into a block

Definition at line 294 of file StrongPHIElimination.cpp.

References llvm::LiveIntervals::getMBBStartIdx(), llvm::LiveIntervals::getOrCreateInterval(), I, and llvm::LiveInterval::liveAt().

Referenced by isLiveInButUnusedBefore(), and isLiveOut().

static bool isLiveOut ( unsigned  r,
MachineBasicBlock MBB,
LiveIntervals LI 
) [static]

isLiveOut - help method that determines, from a regno, if a register is live out of a block.

Definition at line 303 of file StrongPHIElimination.cpp.

References E, isLiveIn(), PI, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().


Variable Documentation

std::vector<DomForestNode*> children

Definition at line 101 of file StrongPHIElimination.cpp.

char ID [static]

Definition at line 41 of file StrongPHIElimination.cpp.

Definition at line 69 of file StrongPHIElimination.cpp.

Definition at line 207 of file StrongPHIElimination.cpp.

Definition at line 63 of file StrongPHIElimination.cpp.

Definition at line 66 of file StrongPHIElimination.cpp.

Definition at line 103 of file StrongPHIElimination.cpp.

Referenced by llvm::SplitCriticalMachineEdge().

std::map<unsigned, std::map<unsigned, MachineBasicBlock*> > RenameSets

Definition at line 59 of file StrongPHIElimination.cpp.

std::map<unsigned, std::vector<unsigned> > Stacks

Definition at line 50 of file StrongPHIElimination.cpp.

Definition at line 54 of file StrongPHIElimination.cpp.

Definition at line 47 of file StrongPHIElimination.cpp.

RegisterPass<StrongPHIElimination> X("strong-phi-node-elimination","Eliminate PHI nodes for register allocation, intelligently") [static]




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.