PS
Size: a a a
PS
E
E
PS
E
PS
E
PS
E
PS
/**
* Build SSA form.
*
* Sorts the graph topologically.
* - Collects them in postOrder array.
*
* Identifies each block's immediate dominator.
* - Computes this in bbIDom of each BasicBlock.
*
* Computes DOM tree relation.
* - Computes domTree as block -> set of blocks.
* - Computes pre/post order traversal of the DOM tree.
*
* Inserts phi nodes.
* - Computes dominance frontier as block -> set of blocks.
* - Allocates block use/def/livein/liveout and computes it.
* - Inserts phi nodes with only rhs at the beginning of the blocks.
*
* Renames variables.
* - Walks blocks in evaluation order and gives uses and defs names.
* - Gives empty phi nodes their rhs arguments as they become known while renaming.
*
* @return true if successful, for now, this must always be true.
*
* @see "A simple, fast dominance algorithm" by Keith D. Cooper, Timothy J. Harvey, Ken Kennedy.
* @see Briggs, Cooper, Harvey and Simpson "Practical Improvements to the Construction
* and Destruction of Static Single Assignment Form."
*/PS
VY
VY
let
function main() =
while 1 do
let
function nested1() =
break
in
nested1()
end
in
main()
end
VY
break прерывал while в таком случае (как это сделано в некоторых языках).МБ
let
function main() =
while 1 do
let
function nested1() =
break
in
nested1()
end
in
main()
end
SS
VY
EG