LLVM  14.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. More...
 
static BlockValueNum GetUndefVal (LDVSSABlock *BB, LDVSSAUpdater *Updater)
 GetUndefVal - Normally creates an IMPLICIT_DEF instruction with a new register. More...
 
static BlockValueNum CreateEmptyPHI (LDVSSABlock *BB, unsigned NumPreds, LDVSSAUpdater *Updater)
 CreateEmptyPHI - Create a (representation of a) PHI in the given block. More...
 
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. More...
 
static LDVSSAPhi * ValueIsPHI (BlockValueNum Val, LDVSSAUpdater *Updater)
 ValueIsPHI - Check if the instruction that defines the specified value is a PHI instruction. More...
 
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. More...
 
static BlockValueNum GetPHIValue (LDVSSAPhi *PHI)
 GetPHIValue - For the specified PHI instruction, return the value that it defines. More...
 

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

Member Typedef Documentation

◆ BlkSucc_iterator

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

Definition at line 3076 of file InstrRefBasedImpl.cpp.

◆ BlkT

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

Definition at line 3073 of file InstrRefBasedImpl.cpp.

◆ PhiT

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

Definition at line 3075 of file InstrRefBasedImpl.cpp.

◆ ValT

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

Definition at line 3074 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 3149 of file InstrRefBasedImpl.cpp.

◆ BlkSucc_begin()

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

Definition at line 3079 of file InstrRefBasedImpl.cpp.

References BB.

◆ BlkSucc_end()

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

Definition at line 3080 of file InstrRefBasedImpl.cpp.

References BB.

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

References BB.

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

References BB, and E.

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

◆ GetUndefVal()

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

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

References LiveDebugValues::ValueIDNum::asU64(), and BB.

◆ PHI_begin()

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

Definition at line 3106 of file InstrRefBasedImpl.cpp.

◆ PHI_end()

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

Definition at line 3108 of file InstrRefBasedImpl.cpp.

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

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


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