1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel accessors sequences compiler.cfg.rpo ;
4 IN: compiler.cfg.predecessors
6 : (compute-predecessors) ( bb -- )
7 dup successors>> [ predecessors>> push ] with each ;
9 : compute-predecessors ( cfg -- cfg' )
10 dup [ (compute-predecessors) ] each-basic-block ;