using dominators in SSA optimizations

Matthew Fluet fluet@CS.Cornell.EDU
Thu, 8 Nov 2001 14:37:33 -0500 (EST)


> I like the dominatorTree stuff because it is so easy to write
> recursive functions over trees -- so maybe we need some abstraction
> for dfs of SSA function cfg's.

Agreed.  Add val Function.dfsTree : Function.t -> Block.t Tree.t?

I just added foldPre and foldPost to Tree -- my purely functional
instincts were balking at yet another loop that accumulates in a Block.t
list ref.  To clean up some of the other loops, it would be worthwhile to
do a minimal port of the dfs visit stuff from directed-graph --
particularly the startNode and finishNode fields.