LLVM API Documentation

Classes | Public Types | Static Public Member Functions
llvm::SSAUpdaterTraits< MachineSSAUpdater > Class Template Reference

List of all members.

Classes

class  PHI_iterator
 Iterator for PHI operands. More...

Public Types

typedef MachineBasicBlock BlkT
typedef unsigned ValT
typedef MachineInstr PhiT
typedef
MachineBasicBlock::succ_iterator 
BlkSucc_iterator

Static Public Member Functions

static BlkSucc_iterator BlkSucc_begin (BlkT *BB)
static BlkSucc_iterator BlkSucc_end (BlkT *BB)
static PHI_iterator PHI_begin (PhiT *PHI)
static PHI_iterator PHI_end (PhiT *PHI)
static void FindPredecessorBlocks (MachineBasicBlock *BB, SmallVectorImpl< MachineBasicBlock * > *Preds)
static unsigned GetUndefVal (MachineBasicBlock *BB, MachineSSAUpdater *Updater)
static unsigned CreateEmptyPHI (MachineBasicBlock *BB, unsigned NumPreds, MachineSSAUpdater *Updater)
static void AddPHIOperand (MachineInstr *PHI, unsigned Val, MachineBasicBlock *Pred)
static MachineInstrInstrIsPHI (MachineInstr *I)
static MachineInstrValueIsPHI (unsigned Val, MachineSSAUpdater *Updater)
static MachineInstrValueIsNewPHI (unsigned Val, MachineSSAUpdater *Updater)
static unsigned GetPHIValue (MachineInstr *PHI)

Detailed Description

template<>
class llvm::SSAUpdaterTraits< MachineSSAUpdater >

Definition at line 240 of file MachineSSAUpdater.cpp.


Member Typedef Documentation

Definition at line 246 of file MachineSSAUpdater.cpp.

typedef MachineBasicBlock llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkT

Definition at line 242 of file MachineSSAUpdater.cpp.

typedef MachineInstr llvm::SSAUpdaterTraits< MachineSSAUpdater >::PhiT

Definition at line 244 of file MachineSSAUpdater.cpp.

typedef unsigned llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValT

Definition at line 243 of file MachineSSAUpdater.cpp.


Member Function Documentation

static void llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand ( MachineInstr PHI,
unsigned  Val,
MachineBasicBlock Pred 
) [inline, static]

AddPHIOperand - Add the specified value as an operand of the PHI for the specified predecessor block.

Definition at line 309 of file MachineSSAUpdater.cpp.

References llvm::MachineInstrBuilder::addMBB(), llvm::MachineBasicBlock::getParent(), and llvm::TargetOpcode::PHI.

static BlkSucc_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin ( BlkT BB) [inline, static]

Definition at line 247 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::succ_begin().

static BlkSucc_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end ( BlkT BB) [inline, static]

Definition at line 248 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::succ_end().

static unsigned llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI ( MachineBasicBlock BB,
unsigned  NumPreds,
MachineSSAUpdater Updater 
) [inline, static]

CreateEmptyPHI - Create a PHI instruction that defines a new register. Add it into the specified block and return the register.

Definition at line 298 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), InsertNewDef(), and llvm::TargetOpcode::PHI.

static void llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks ( MachineBasicBlock BB,
SmallVectorImpl< MachineBasicBlock * > *  Preds 
) [inline, static]

FindPredecessorBlocks - Put the predecessors of BB into the Preds vector.

Definition at line 277 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

static unsigned llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPHIValue ( MachineInstr PHI) [inline, static]

GetPHIValue - For the specified PHI instruction, return the register that it defines.

Definition at line 339 of file MachineSSAUpdater.cpp.

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

static unsigned llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal ( MachineBasicBlock BB,
MachineSSAUpdater Updater 
) [inline, static]

GetUndefVal - Create an IMPLICIT_DEF instruction with a new register. Add it into the specified block and return the register.

Definition at line 286 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::TargetOpcode::IMPLICIT_DEF, and InsertNewDef().

static MachineInstr* llvm::SSAUpdaterTraits< MachineSSAUpdater >::InstrIsPHI ( MachineInstr I) [inline, static]

InstrIsPHI - Check if an instruction is a PHI.

Definition at line 316 of file MachineSSAUpdater.cpp.

References llvm::MachineInstr::isPHI().

static PHI_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_begin ( PhiT PHI) [inline, static]

Definition at line 270 of file MachineSSAUpdater.cpp.

static PHI_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_end ( PhiT PHI) [inline, static]

Definition at line 271 of file MachineSSAUpdater.cpp.

static MachineInstr* llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValueIsNewPHI ( unsigned  Val,
MachineSSAUpdater Updater 
) [inline, static]

ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source operands, i.e., it was just added.

Definition at line 330 of file MachineSSAUpdater.cpp.

References llvm::MachineInstr::getNumOperands(), and llvm::TargetOpcode::PHI.

static MachineInstr* llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValueIsPHI ( unsigned  Val,
MachineSSAUpdater Updater 
) [inline, static]

ValueIsPHI - Check if the instruction that defines the specified register is a PHI instruction.

Definition at line 324 of file MachineSSAUpdater.cpp.

References llvm::MachineRegisterInfo::getVRegDef().


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