[LLVMdev] Breaking critical edges

Lang Hames lhames at gmail.com
Mon Jan 31 20:13:51 PST 2011


Hi Surinder,

Being "critical" is a property of an edge, rather than a node. An edge e =
(n1, n2) is a critical edge if n1 has multiple successors and n2 has
multiple predecessors. Once BreakCriticalEdges is run there will be no edge
in the CFG with this property.

The way this works is that the BreakCriticalEdges pass will scan every edge
e in the CFG. If e is critical then a new node, ne, will be inserted, along
with new edges e1 = (n1, ne), and e2 = (ne, n2), and edge e will be removed.
The edge e1 is not critical (it has only one successor, which is ne), and
the edge e2 is not critical (it has only one predecessor, which is ne). So
this eliminates the critical edge.

Cheers,
Lang.

On Tue, Feb 1, 2011 at 1:23 PM, Surinder <surifilms at gmail.com> wrote:

> Is the pass "Break Critical edges" acheives the same as edge-splitting
> SSA, i.e., a node has either multiple predecessors or multiple
> successors but not both.  A node with multiple predecessors and
> multiple successors is replaced by two consecutive nodes joined
> together.  The first node has multiple predecessors and second node as
> its only successor.  The second node has first node as its only
> predecessor and has mutliple successors.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110201/64da5524/attachment.html>


More information about the llvm-dev mailing list