LLVM API Documentation

llvm::PHIElimination Class Reference

Lower PHI instructions to copies. More...

#include <PHIElimination.h>

Inheritance diagram for llvm::PHIElimination:
[legend]
Collaboration diagram for llvm::PHIElimination:
[legend]

List of all members.

Public Types

typedef PHIKillList::iterator phi_kill_iterator
typedef PHIKillList::const_iterator const_phi_kill_iterator

Public Member Functions

 PHIElimination ()
virtual bool runOnMachineFunction (MachineFunction &Fn)
virtual void getAnalysisUsage (AnalysisUsage &AU) const
bool hasPHIDef (unsigned vreg) const
MachineBasicBlock * getPHIDefBlock (unsigned vreg)
bool hasPHIKills (unsigned vreg) const
 Returns true if the given vreg was killed by a PHI instr.
phi_kill_iterator phiKillsBegin (unsigned vreg)
phi_kill_iterator phiKillsEnd (unsigned vreg)

Static Public Attributes

static char ID = 0


Detailed Description

Lower PHI instructions to copies.

Definition at line 24 of file PHIElimination.h.


Member Typedef Documentation

typedef PHIKillList::iterator llvm::PHIElimination::phi_kill_iterator

Definition at line 34 of file PHIElimination.h.

typedef PHIKillList::const_iterator llvm::PHIElimination::const_phi_kill_iterator

Definition at line 35 of file PHIElimination.h.


Constructor & Destructor Documentation

llvm::PHIElimination::PHIElimination (  )  [inline]

Definition at line 38 of file PHIElimination.h.


Member Function Documentation

bool llvm::PHIElimination::runOnMachineFunction ( MachineFunction &  MF  )  [virtual]

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Implements llvm::MachineFunctionPass.

Definition at line 51 of file PHIElimination.cpp.

References llvm::MachineFunction::begin(), Changed, E, llvm::MachineFunction::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), and llvm::MachineRegisterInfo::use_empty().

void llvm::PHIElimination::getAnalysisUsage ( AnalysisUsage &  AU  )  const [virtual]

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.

Reimplemented from llvm::MachineFunctionPass.

Definition at line 43 of file PHIElimination.cpp.

References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addPreservedID(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachineDominatorsID, llvm::MachineLoopInfoID, and llvm::AnalysisUsage::setPreservesCFG().

bool llvm::PHIElimination::hasPHIDef ( unsigned  vreg  )  const [inline]

Return true if the given vreg was defined by a PHI intsr prior to lowering.

Definition at line 46 of file PHIElimination.h.

MachineBasicBlock* llvm::PHIElimination::getPHIDefBlock ( unsigned  vreg  )  [inline]

Returns the block in which the PHI instruction which defined the given vreg used to reside.

Definition at line 52 of file PHIElimination.h.

bool llvm::PHIElimination::hasPHIKills ( unsigned  vreg  )  const [inline]

Returns true if the given vreg was killed by a PHI instr.

Definition at line 59 of file PHIElimination.h.

phi_kill_iterator llvm::PHIElimination::phiKillsBegin ( unsigned  vreg  )  [inline]

Returns an iterator over the BasicBlocks which contained PHI kills of this register prior to lowering.

Definition at line 65 of file PHIElimination.h.

phi_kill_iterator llvm::PHIElimination::phiKillsEnd ( unsigned  vreg  )  [inline]

Definition at line 70 of file PHIElimination.h.


Member Data Documentation

char PHIElimination::ID = 0 [static]

Definition at line 37 of file PHIElimination.h.


The documentation for this class was generated from the following files: