llvm::SplitCriticalEdge

Split the critical edge between two basic blocks if one exists.

Synopsis

Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>

BasicBlock*
SplitCriticalEdge(
    BasicBlock* Src,
    BasicBlock* Dst,
    CriticalEdgeSplittingOptions const& Options = CriticalEdgeSplittingOptions());

Description

If an edge from Src to Dst is critical, split the edge and return the new block, otherwise return null. This method requires that there be an edge between the two blocks. It updates the analyses passed in the options struct.

Return Value

The new block if the edge was split, or null otherwise.

Parameters

NameDescription
SrcSource block of the edge.
DstDestination block of the edge.
OptionsAnalyses and policy controlling the split.