LLVM 20.0.0git
Classes | Public Types | Static Public Member Functions | List of all members
llvm::SSAUpdaterTraits< MachineSSAUpdater > Class Reference

SSAUpdaterTraits<MachineSSAUpdater> - Traits for the SSAUpdaterImpl template, specialized for MachineSSAUpdater. More...

Classes

class  PHI_iterator
 Iterator for PHI operands. More...
 

Public Types

using BlkT = MachineBasicBlock
 
using ValT = Register
 
using PhiT = MachineInstr
 
using BlkSucc_iterator = MachineBasicBlock::succ_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)
 FindPredecessorBlocks - Put the predecessors of BB into the Preds vector.
 
static Register GetPoisonVal (MachineBasicBlock *BB, MachineSSAUpdater *Updater)
 GetPoisonVal - Create an IMPLICIT_DEF instruction with a new register.
 
static Register CreateEmptyPHI (MachineBasicBlock *BB, unsigned NumPreds, MachineSSAUpdater *Updater)
 CreateEmptyPHI - Create a PHI instruction that defines a new register.
 
static void AddPHIOperand (MachineInstr *PHI, Register Val, MachineBasicBlock *Pred)
 AddPHIOperand - Add the specified value as an operand of the PHI for the specified predecessor block.
 
static MachineInstrInstrIsPHI (MachineInstr *I)
 InstrIsPHI - Check if an instruction is a PHI.
 
static MachineInstrValueIsPHI (Register Val, MachineSSAUpdater *Updater)
 ValueIsPHI - Check if the instruction that defines the specified register is a PHI instruction.
 
static MachineInstrValueIsNewPHI (Register Val, MachineSSAUpdater *Updater)
 ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source operands, i.e., it was just added.
 
static Register GetPHIValue (MachineInstr *PHI)
 GetPHIValue - For the specified PHI instruction, return the register that it defines.
 

Detailed Description

SSAUpdaterTraits<MachineSSAUpdater> - Traits for the SSAUpdaterImpl template, specialized for MachineSSAUpdater.

Definition at line 263 of file MachineSSAUpdater.cpp.

Member Typedef Documentation

◆ BlkSucc_iterator

Definition at line 268 of file MachineSSAUpdater.cpp.

◆ BlkT

Definition at line 265 of file MachineSSAUpdater.cpp.

◆ PhiT

Definition at line 267 of file MachineSSAUpdater.cpp.

◆ ValT

Definition at line 266 of file MachineSSAUpdater.cpp.

Member Function Documentation

◆ AddPHIOperand()

static void llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand ( MachineInstr PHI,
Register  Val,
MachineBasicBlock Pred 
)
inlinestatic

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

Definition at line 333 of file MachineSSAUpdater.cpp.

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

◆ BlkSucc_begin()

static BlkSucc_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin ( BlkT BB)
inlinestatic

Definition at line 270 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::succ_begin().

◆ BlkSucc_end()

static BlkSucc_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end ( BlkT BB)
inlinestatic

Definition at line 271 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::succ_end().

◆ CreateEmptyPHI()

static Register llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI ( MachineBasicBlock BB,
unsigned  NumPreds,
MachineSSAUpdater Updater 
)
inlinestatic

CreateEmptyPHI - Create a PHI instruction that defines a new register.

Add it into the specified block and return the register.

Definition at line 322 of file MachineSSAUpdater.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), InsertNewDef(), and PHI.

◆ FindPredecessorBlocks()

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

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

Definition at line 304 of file MachineSSAUpdater.cpp.

References llvm::append_range(), and llvm::MachineBasicBlock::predecessors().

◆ GetPHIValue()

static Register llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPHIValue ( MachineInstr PHI)
inlinestatic

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

Definition at line 362 of file MachineSSAUpdater.cpp.

References PHI.

◆ GetPoisonVal()

static Register llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPoisonVal ( MachineBasicBlock BB,
MachineSSAUpdater Updater 
)
inlinestatic

GetPoisonVal - Create an IMPLICIT_DEF instruction with a new register.

Add it into the specified block and return the register.

Definition at line 311 of file MachineSSAUpdater.cpp.

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

◆ InstrIsPHI()

static MachineInstr * llvm::SSAUpdaterTraits< MachineSSAUpdater >::InstrIsPHI ( MachineInstr I)
inlinestatic

InstrIsPHI - Check if an instruction is a PHI.

Definition at line 339 of file MachineSSAUpdater.cpp.

References I.

◆ PHI_begin()

static PHI_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_begin ( PhiT PHI)
inlinestatic

Definition at line 296 of file MachineSSAUpdater.cpp.

References PHI.

◆ PHI_end()

static PHI_iterator llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_end ( PhiT PHI)
inlinestatic

Definition at line 298 of file MachineSSAUpdater.cpp.

References PHI.

◆ ValueIsNewPHI()

static MachineInstr * llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValueIsNewPHI ( Register  Val,
MachineSSAUpdater Updater 
)
inlinestatic

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

Definition at line 353 of file MachineSSAUpdater.cpp.

References PHI.

◆ ValueIsPHI()

static MachineInstr * llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValueIsPHI ( Register  Val,
MachineSSAUpdater Updater 
)
inlinestatic

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

Definition at line 347 of file MachineSSAUpdater.cpp.

References llvm::MachineRegisterInfo::getVRegDef().


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