LLVM: llvm::SSAUpdaterImpl< UpdaterT > Class Template Reference (original) (raw)

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

Public Member Functions
SSAUpdaterImpl (UpdaterT *U, AvailableValsTy *A, SmallVectorImpl< PhiT * > *Ins)
ValT GetValue (BlkT *BB)
GetValue - Check to see if AvailableVals has an entry for the specified BB and if so, return it.
BBInfo * BuildBlockList (BlkT *BB, BlockListTy *BlockList)
BuildBlockList - Starting from the specified basic block, traverse back through its predecessors until reaching blocks with known values.
BBInfo * IntersectDominators (BBInfo *Blk1, BBInfo *Blk2)
IntersectDominators - This is the dataflow lattice "meet" operation for finding dominators.
void FindDominators (BlockListTy *BlockList, BBInfo *PseudoEntry)
FindDominators - Calculate the dominator tree for the subset of the CFG corresponding to the basic blocks on the BlockList.
bool IsDefInDomFrontier (const BBInfo *Pred, const BBInfo *IDom)
IsDefInDomFrontier - Search up the dominator tree from Pred to IDom for any blocks containing definitions of the value.
void FindPHIPlacement (BlockListTy *BlockList)
FindPHIPlacement - PHIs are needed in the iterated dominance frontiers of the known definitions.
bool FindSingularVal (BBInfo *Info)
Check all predecessors and if all of them have the same AvailableVal use it as value for block represented by Info.
void FindAvailableVals (BlockListTy *BlockList)
FindAvailableVal - If this block requires a PHI, first check if an existing PHI matches the PHI placement and reaching definitions computed earlier, and if not, create a new PHI.
void FindExistingPHI (BlkT *BB)
FindExistingPHI - Look through the PHI nodes in a block to see if any of them match what is needed.
bool CheckIfPHIMatches (PhiT *PHI, BlockListTy &TaggedBlocks)
CheckIfPHIMatches - Check if a PHI node matches the placement and values in the BBMap.
void RecordMatchingPHIs (BlockListTy &TaggedBlocks)
RecordMatchingPHIs - For each PHI node that matches, record it in both the BBMap and the AvailableVals mapping.

template
class llvm::SSAUpdaterImpl< UpdaterT >

Definition at line 31 of file SSAUpdaterImpl.h.

template

BuildBlockList()

template

BuildBlockList - Starting from the specified basic block, traverse back through its predecessors until reaching blocks with known values.

Create BBInfo structures for the blocks and append them to the block list.

Definition at line 116 of file SSAUpdaterImpl.h.

References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorImpl< T >::clear(), E(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), Info, llvm::SmallVectorTemplateBase< T, bool >::pop_back(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

Referenced by GetValue().

CheckIfPHIMatches()

template

FindAvailableVals()

template

FindAvailableVal - If this block requires a PHI, first check if an existing PHI matches the PHI placement and reaching definitions computed earlier, and if not, create a new PHI.

Visit all the block's predecessors to calculate the available value for each one and fill in the incoming values for a new PHI.

Definition at line 353 of file SSAUpdaterImpl.h.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::dbgs(), E(), llvm::SmallVectorTemplateCommon< T, typename >::end(), FindExistingPHI(), FindSingularVal(), I, Info, LLVM_DEBUG, PHI, llvm::SmallVectorTemplateCommon< T, typename >::rbegin(), and llvm::SmallVectorTemplateCommon< T, typename >::rend().

Referenced by GetValue().

FindDominators()

template

FindDominators - Calculate the dominator tree for the subset of the CFG corresponding to the basic blocks on the BlockList.

This uses the algorithm from: "A Simple, Fast Dominance Algorithm" by Cooper, Harvey and Kennedy, published in Software–Practice and Experience, 2001, 4:1-10. Because the CFG subset does not include any edges leading into blocks that define the value, the results are not the usual dominator tree. The CFG subset has a single pseudo-entry node with edges to a set of root nodes for blocks that define the value. The dominators for this subset CFG are not the standard dominators but they are adequate for placing PHIs within the subset CFG.

Definition at line 240 of file SSAUpdaterImpl.h.

References Changed, E(), I, Info, IntersectDominators(), llvm::SmallVectorTemplateCommon< T, typename >::rbegin(), and llvm::SmallVectorTemplateCommon< T, typename >::rend().

Referenced by GetValue().

FindExistingPHI()

template

FindPHIPlacement()

template

FindSingularVal()

template

GetValue()

template

IntersectDominators()

template

IntersectDominators - This is the dataflow lattice "meet" operation for finding dominators.

Given two basic blocks, it walks up the dominator tree until it finds a common dominator of both. It uses the postorder number of the blocks to determine how to do that.

Definition at line 214 of file SSAUpdaterImpl.h.

Referenced by FindDominators().

IsDefInDomFrontier()

template

IsDefInDomFrontier - Search up the dominator tree from Pred to IDom for any blocks containing definitions of the value.

If one is found, then the successor of Pred is in the dominance frontier for the definition, and this function returns true.

Definition at line 282 of file SSAUpdaterImpl.h.

Referenced by FindPHIPlacement().

RecordMatchingPHIs()

template


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