diff options
author | Magnus Lång <[email protected]> | 2016-03-17 21:48:55 +0100 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-08-30 17:17:59 +0200 |
commit | c7a0cd1b5710178878d9b240f634e9eda7e68d96 (patch) | |
tree | b287178ec0495d089857287df7e78b1ca119422c /lib/hipe/regalloc/hipe_coalescing_regalloc.erl | |
parent | dc4e9384c6f2f733ab0d12727ab53238bda3fbca (diff) | |
download | otp-c7a0cd1b5710178878d9b240f634e9eda7e68d96.tar.gz otp-c7a0cd1b5710178878d9b240f634e9eda7e68d96.tar.bz2 otp-c7a0cd1b5710178878d9b240f634e9eda7e68d96.zip |
hipe: Reuse liveness info for spillmin
For x86, additionally reuse liveness from float LSRA for the GP LSRA.
Diffstat (limited to 'lib/hipe/regalloc/hipe_coalescing_regalloc.erl')
-rw-r--r-- | lib/hipe/regalloc/hipe_coalescing_regalloc.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/hipe/regalloc/hipe_coalescing_regalloc.erl b/lib/hipe/regalloc/hipe_coalescing_regalloc.erl index e2f817d369..bbb2e3ecf0 100644 --- a/lib/hipe/regalloc/hipe_coalescing_regalloc.erl +++ b/lib/hipe/regalloc/hipe_coalescing_regalloc.erl @@ -51,13 +51,14 @@ %% %% Returns: %% Coloring -- A coloring for specified CFG -%% SpillIndex0 -- A new spill index +%% SpillIndex2 -- A new spill index %%----------------------------------------------------------------------- regalloc(CFG, SpillIndex, SpillLimit, Target, _Options) -> %% Build interference graph ?debug_msg("Build IG\n", []), - IG = hipe_ig:build(CFG, Target), + Liveness = Target:analyze(CFG), + IG = hipe_ig:build(CFG, Liveness, Target), %% io:format("IG: ~p\n", [IG]), ?debug_msg("Init\n", []), @@ -94,9 +95,10 @@ regalloc(CFG, SpillIndex, SpillLimit, Target, _Options) -> %% io:format("color0:~w\nColor1:~w\nNodes:~w\nNodes2:~w\nNum_Temps:~w\n",[Color0,Color1,Node_sets,Node_sets2,Num_Temps]), ?debug_msg("Build mapping ~p\n", [Node_sets2]), - Coloring = build_namelist(Node_sets2, SpillIndex, Alias0, Color1), + {Coloring, SpillIndex2} = + build_namelist(Node_sets2, SpillIndex, Alias0, Color1), ?debug_msg("Coloring ~p\n", [Coloring]), - Coloring. + {Coloring, SpillIndex2, Liveness}. %%---------------------------------------------------------------------- %% Function: do_coloring |