class IDFCalculatorBase
Declaration
template <class NodeTy, bool IsPostDom>
class IDFCalculatorBase { /* full declaration omitted */ };
Description
Determine the iterated dominance frontier, given a set of defining blocks, and optionally, a set of live-in blocks. In turn, the results can be used to place phi nodes. This algorithm is a linear time computation of Iterated Dominance Frontiers, pruned using the live-in set. By default, liveness is not used to prune the IDF computation. The template parameters should be of a CFG block type.
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:57
Templates
- NodeTy
- bool IsPostDom
Method Overview
- public IDFCalculatorBase<NodeTy, IsPostDom>(DominatorTreeBase<NodeTy, IsPostDom> & DT)
- public IDFCalculatorBase<NodeTy, IsPostDom>(DominatorTreeBase<NodeTy, IsPostDom> & DT, const llvm::IDFCalculatorBase::ChildrenGetterTy & C)
- public void calculate(SmallVectorImpl<NodeTy *> & IDFBlocks)
- public void resetLiveInBlocks()
- public void setDefiningBlocks(const SmallPtrSetImpl<NodeTy *> & Blocks)
- public void setLiveInBlocks(const SmallPtrSetImpl<NodeTy *> & Blocks)
Methods
¶IDFCalculatorBase<NodeTy, IsPostDom>(
DominatorTreeBase<NodeTy, IsPostDom>& DT)
IDFCalculatorBase<NodeTy, IsPostDom>(
DominatorTreeBase<NodeTy, IsPostDom>& DT)
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:64
Parameters
- DominatorTreeBase<NodeTy, IsPostDom>& DT
¶IDFCalculatorBase<NodeTy, IsPostDom>(
DominatorTreeBase<NodeTy, IsPostDom>& DT,
const llvm::IDFCalculatorBase::
ChildrenGetterTy& C)
IDFCalculatorBase<NodeTy, IsPostDom>(
DominatorTreeBase<NodeTy, IsPostDom>& DT,
const llvm::IDFCalculatorBase::
ChildrenGetterTy& C)
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:66
Parameters
- DominatorTreeBase<NodeTy, IsPostDom>& DT
- const llvm::IDFCalculatorBase::ChildrenGetterTy& C
¶void calculate(
SmallVectorImpl<NodeTy*>& IDFBlocks)
void calculate(
SmallVectorImpl<NodeTy*>& IDFBlocks)
Description
Calculate iterated dominance frontiers This uses the linear-time phi algorithm based on DJ-graphs mentioned in the file-level comment. It performs DF->IDF pruning using the live-in set, to avoid computing the IDF for blocks where an inserted PHI node would be dead.
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:102
Parameters
- SmallVectorImpl<NodeTy*>& IDFBlocks
¶void resetLiveInBlocks()
void resetLiveInBlocks()
Description
Reset the live-in block set to be empty, and tell the IDF calculator to not use liveness anymore.
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:91
¶void setDefiningBlocks(
const SmallPtrSetImpl<NodeTy*>& Blocks)
void setDefiningBlocks(
const SmallPtrSetImpl<NodeTy*>& Blocks)
Description
Give the IDF calculator the set of blocks in which the value is defined. This is equivalent to the set of starting blocks it should be calculating the IDF for (though later gets pruned based on liveness). Note: This set *must* live for the entire lifetime of the IDF calculator.
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:75
Parameters
- const SmallPtrSetImpl<NodeTy*>& Blocks
¶void setLiveInBlocks(
const SmallPtrSetImpl<NodeTy*>& Blocks)
void setLiveInBlocks(
const SmallPtrSetImpl<NodeTy*>& Blocks)
Description
Give the IDF calculator the set of blocks in which the value is live on entry to the block. This is used to prune the IDF calculation to not include blocks where any phi insertion would be dead. Note: This set *must* live for the entire lifetime of the IDF calculator.
Declared at: llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h:84
Parameters
- const SmallPtrSetImpl<NodeTy*>& Blocks