* canonicalize a => puts a in the canonical form by eliminating repeat nodes and edges
* does so by sorting them first, then eliminating consecutive temps
*)
fun canonicalize orig =
let
val sorig = ListMergeSort.sort (fn ((a,_),(b,_)) => X.cmpoper (a,b) = LESS) orig
* canonicalize a => puts a in the canonical form by eliminating repeat nodes and edges
* does so by sorting them first, then eliminating consecutive temps
*)
fun canonicalize orig =
let
val sorig = ListMergeSort.sort (fn ((a,_),(b,_)) => X.cmpoper (a,b) = LESS) orig