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

Template specialization to give SSAUpdater access to CFG and value information. More...

Classes

class  PHI_iterator
 Iterator for PHI operands. More...
 

Public Types

using BlkT = LDVSSABlock
 
using ValT = BlockValueNum
 
using PhiT = LDVSSAPhi
 
using BlkSucc_iterator = LDVSSABlockIterator
 

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 (LDVSSABlock *BB, SmallVectorImpl< LDVSSABlock * > *Preds)
 FindPredecessorBlocks - Put the predecessors of BB into the Preds vector.
 
static BlockValueNum GetPoisonVal (LDVSSABlock *BB, LDVSSAUpdater *Updater)
 GetPoisonVal - Normally creates an IMPLICIT_DEF instruction with a new register.
 
static BlockValueNum CreateEmptyPHI (LDVSSABlock *BB, unsigned NumPreds, LDVSSAUpdater *Updater)
 CreateEmptyPHI - Create a (representation of a) PHI in the given block.
 
static void AddPHIOperand (LDVSSAPhi *PHI, BlockValueNum Val, LDVSSABlock *Pred)
 AddPHIOperand - Add the specified value as an operand of the PHI for the specified predecessor block.
 
static LDVSSAPhi * ValueIsPHI (BlockValueNum Val, LDVSSAUpdater *Updater)
 ValueIsPHI - Check if the instruction that defines the specified value is a PHI instruction.
 
static LDVSSAPhi * ValueIsNewPHI (BlockValueNum Val, LDVSSAUpdater *Updater)
 ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source operands, i.e., it was just added.
 
static BlockValueNum GetPHIValue (LDVSSAPhi *PHI)
 GetPHIValue - For the specified PHI instruction, return the value that it defines.
 

Detailed Description

Template specialization to give SSAUpdater access to CFG and value information.

SSAUpdater calls methods in these traits, passing in the LDVSSAUpdater object, to learn about blocks and the values they define. It also provides methods to create PHI nodes and track them.

Definition at line 3999 of file InstrRefBasedImpl.cpp.

Member Typedef Documentation

◆ BlkSucc_iterator

using llvm::SSAUpdaterTraits< LDVSSAUpdater >::BlkSucc_iterator = LDVSSABlockIterator

Definition at line 4004 of file InstrRefBasedImpl.cpp.

◆ BlkT

using llvm::SSAUpdaterTraits< LDVSSAUpdater >::BlkT = LDVSSABlock

Definition at line 4001 of file InstrRefBasedImpl.cpp.

◆ PhiT

using llvm::SSAUpdaterTraits< LDVSSAUpdater >::PhiT = LDVSSAPhi

Definition at line 4003 of file InstrRefBasedImpl.cpp.

◆ ValT

using llvm::SSAUpdaterTraits< LDVSSAUpdater >::ValT = BlockValueNum

Definition at line 4002 of file InstrRefBasedImpl.cpp.

Member Function Documentation

◆ AddPHIOperand()

static void llvm::SSAUpdaterTraits< LDVSSAUpdater >::AddPHIOperand ( LDVSSAPhi *  PHI,
BlockValueNum  Val,
LDVSSABlock *  Pred 
)
inlinestatic

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

Definition at line 4075 of file InstrRefBasedImpl.cpp.

References PHI.

◆ BlkSucc_begin()

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

Definition at line 4007 of file InstrRefBasedImpl.cpp.

◆ BlkSucc_end()

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

Definition at line 4008 of file InstrRefBasedImpl.cpp.

◆ CreateEmptyPHI()

static BlockValueNum llvm::SSAUpdaterTraits< LDVSSAUpdater >::CreateEmptyPHI ( LDVSSABlock *  BB,
unsigned  NumPreds,
LDVSSAUpdater *  Updater 
)
inlinestatic

CreateEmptyPHI - Create a (representation of a) PHI in the given block.

SSAUpdater will populate it with information about incoming values. The value number of this PHI is whatever the machine value number problem solution determined it to be. This includes non-phi values if SSAUpdater tries to create a PHI where the incoming values are identical.

Definition at line 4065 of file InstrRefBasedImpl.cpp.

References PHI.

◆ FindPredecessorBlocks()

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

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

Definition at line 4042 of file InstrRefBasedImpl.cpp.

References llvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ GetPHIValue()

static BlockValueNum llvm::SSAUpdaterTraits< LDVSSAUpdater >::GetPHIValue ( LDVSSAPhi *  PHI)
inlinestatic

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

Definition at line 4096 of file InstrRefBasedImpl.cpp.

References PHI.

◆ GetPoisonVal()

static BlockValueNum llvm::SSAUpdaterTraits< LDVSSAUpdater >::GetPoisonVal ( LDVSSABlock *  BB,
LDVSSAUpdater *  Updater 
)
inlinestatic

GetPoisonVal - Normally creates an IMPLICIT_DEF instruction with a new register.

For LiveDebugValues, represents a block identified as not having any DBG_PHI predecessors.

Definition at line 4051 of file InstrRefBasedImpl.cpp.

References LiveDebugValues::ValueIDNum::asU64().

◆ PHI_begin()

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

Definition at line 4034 of file InstrRefBasedImpl.cpp.

References PHI.

◆ PHI_end()

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

Definition at line 4036 of file InstrRefBasedImpl.cpp.

References PHI.

◆ ValueIsNewPHI()

static LDVSSAPhi * llvm::SSAUpdaterTraits< LDVSSAUpdater >::ValueIsNewPHI ( BlockValueNum  Val,
LDVSSAUpdater *  Updater 
)
inlinestatic

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

Definition at line 4087 of file InstrRefBasedImpl.cpp.

References PHI.

◆ ValueIsPHI()

static LDVSSAPhi * llvm::SSAUpdaterTraits< LDVSSAUpdater >::ValueIsPHI ( BlockValueNum  Val,
LDVSSAUpdater *  Updater 
)
inlinestatic

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

Definition at line 4081 of file InstrRefBasedImpl.cpp.


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