LLVM 22.0.0git
llvm::SSAUpdaterTraits< LDVSSAUpdater > Class Reference

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

Inheritance diagram for llvm::SSAUpdaterTraits< LDVSSAUpdater >:
[legend]

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 4029 of file InstrRefBasedImpl.cpp.

Member Typedef Documentation

◆ BlkSucc_iterator

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

Definition at line 4034 of file InstrRefBasedImpl.cpp.

◆ BlkT

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

Definition at line 4031 of file InstrRefBasedImpl.cpp.

◆ PhiT

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

Definition at line 4033 of file InstrRefBasedImpl.cpp.

◆ ValT

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

Definition at line 4032 of file InstrRefBasedImpl.cpp.

Member Function Documentation

◆ AddPHIOperand()

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 4105 of file InstrRefBasedImpl.cpp.

References PHI.

◆ BlkSucc_begin()

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

Definition at line 4037 of file InstrRefBasedImpl.cpp.

◆ BlkSucc_end()

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

Definition at line 4038 of file InstrRefBasedImpl.cpp.

◆ CreateEmptyPHI()

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 4095 of file InstrRefBasedImpl.cpp.

References PHI.

◆ FindPredecessorBlocks()

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

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

Definition at line 4072 of file InstrRefBasedImpl.cpp.

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

◆ GetPHIValue()

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

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

Definition at line 4126 of file InstrRefBasedImpl.cpp.

References PHI.

◆ GetPoisonVal()

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 4081 of file InstrRefBasedImpl.cpp.

References LiveDebugValues::ValueIDNum::asU64(), and llvm::MachineBasicBlock::getNumber().

◆ PHI_begin()

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

Definition at line 4064 of file InstrRefBasedImpl.cpp.

References PHI.

◆ PHI_end()

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

Definition at line 4066 of file InstrRefBasedImpl.cpp.

References PHI.

◆ ValueIsNewPHI()

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 4117 of file InstrRefBasedImpl.cpp.

References PHI, and ValueIsPHI().

◆ ValueIsPHI()

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 4111 of file InstrRefBasedImpl.cpp.

Referenced by ValueIsNewPHI().


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