LLVM: llvm::DebugSSAUpdater Class Reference (original) (raw)

Class used to determine the live ranges of debug variables in IR using SSA construction (via the SSAUpdaterImpl class), used for analysis purposes. More...

#include "[llvm/Transforms/Utils/DebugSSAUpdater.h](DebugSSAUpdater%5F8h%5Fsource.html)"

Public Member Functions
DebugSSAUpdater (SmallVectorImpl< DbgSSAPhi * > *InsertedPHIs=nullptr)
If InsertedPHIs is specified, it will be filled in with all PHI Nodes created by rewriting.
DebugSSAUpdater (const DebugSSAUpdater &)=delete
DebugSSAUpdater & operator= (const DebugSSAUpdater &)=delete
~DebugSSAUpdater ()
void reset ()
void initialize ()
DbgSSABlock * getDbgSSABlock (BasicBlock *BB)
For a given BB, create a wrapper block for it.
void addAvailableValue (DbgSSABlock *BB, DbgValueDef DV)
Indicate that a rewritten value is available in the specified block with the specified value.
bool hasValueForBlock (DbgSSABlock *BB) const
Return true if the DebugSSAUpdater already has a value for the specified block.
DbgValueDef findValueForBlock (DbgSSABlock *BB) const
Return the value for the specified block if the DebugSSAUpdater has one, otherwise return nullptr.
DbgValueDef getValueAtEndOfBlock (DbgSSABlock *BB)
Construct SSA form, materializing a value that is live at the end of the specified block.
DbgValueDef getValueInMiddleOfBlock (DbgSSABlock *BB)
Construct SSA form, materializing a value that is live in the middle of the specified block.

Class used to determine the live ranges of debug variables in IR using SSA construction (via the SSAUpdaterImpl class), used for analysis purposes.

Definition at line 215 of file DebugSSAUpdater.h.

If InsertedPHIs is specified, it will be filled in with all PHI Nodes created by rewriting.

Definition at line 45 of file DebugSSAUpdater.cpp.

Referenced by DebugSSAUpdater(), and operator=().

DebugSSAUpdater() [2/2]

~DebugSSAUpdater()

llvm::DebugSSAUpdater::~DebugSSAUpdater ( ) inline

addAvailableValue()

Indicate that a rewritten value is available in the specified block with the specified value.

Definition at line 58 of file DebugSSAUpdater.cpp.

findValueForBlock()

getDbgSSABlock()

getValueAtEndOfBlock()

getValueInMiddleOfBlock()

Construct SSA form, materializing a value that is live in the middle of the specified block.

getValueInMiddleOfBlock is the same as GetValueAtEndOfBlock except in one important case: if there is a definition of the rewritten value after the 'use' in BB. Consider code like this:

X1 = ...

SomeBB:

X2 = ...

br Cond, SomeBB, OutBB

Move duplicate certain instructions close to their use

const SmallVectorImpl< MachineOperand > & Cond

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

In this case, there are two values (X1 and X2) added to the AvailableVals set by the client of the rewriter, and those values are both live out of their respective blocks. However, the use of X happens in the middle of a block. Because of this, we need to insert a new PHI node in SomeBB to merge the appropriate values, and this value isn't live out of the block.

Definition at line 67 of file DebugSSAUpdater.cpp.

References llvm::DbgSSAPhi::addIncoming(), llvm::DbgValueDef::agreesWith(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), getValueAtEndOfBlock(), hasValueForBlock(), llvm::DbgValueDef::IsUndef, LLVM_DEBUG, llvm::DbgSSABlock::newPHI(), llvm::DbgSSABlock::predecessors(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().

hasValueForBlock()

initialize()

void DebugSSAUpdater::initialize ( )

operator=()

reset()

void llvm::DebugSSAUpdater::reset ( ) inline

SSAUpdaterTraits< DebugSSAUpdater >


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