From d438785e9c5e47e6e1ed3bfafcd504a2f1c8c774 Mon Sep 17 00:00:00 2001 From: "Ben.Lippmeier@anu.edu.au" Date: Mon, 10 Sep 2007 16:29:09 +0000 Subject: [PATCH] Make sure to coalesce all the nodes found during iterative scanning --- compiler/nativeGen/GraphColor.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/nativeGen/GraphColor.hs b/compiler/nativeGen/GraphColor.hs index 6956c8d..dfb2d17 100644 --- a/compiler/nativeGen/GraphColor.hs +++ b/compiler/nativeGen/GraphColor.hs @@ -67,8 +67,12 @@ colorGraph iterative colors triv spill graph0 -- If iterative coalescing is enabled, the scanner will coalesce the graph as does its business. -- We need to apply all the coalescences found by the scanner to the original -- graph before doing assignColors. + -- + -- Because we've got the whole, non-pruned graph here we turn on aggressive coalecing + -- to force all the (conservative) coalescences found during scanning. + -- (graph_scan_coalesced, _) - = mapAccumL (coalesceNodes False triv) graph_coalesced kksCoalesce2 + = mapAccumL (coalesceNodes True triv) graph_coalesced kksCoalesce2 -- color the trivially colorable nodes -- during scanning, keys of triv nodes were added to the front of the list as they were found -- 1.7.10.4