aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/regalloc/hipe_regalloc_loop.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hipe/regalloc/hipe_regalloc_loop.erl')
-rw-r--r--lib/hipe/regalloc/hipe_regalloc_loop.erl18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/hipe/regalloc/hipe_regalloc_loop.erl b/lib/hipe/regalloc/hipe_regalloc_loop.erl
index 5d32073437..29ef3adcc2 100644
--- a/lib/hipe/regalloc/hipe_regalloc_loop.erl
+++ b/lib/hipe/regalloc/hipe_regalloc_loop.erl
@@ -99,11 +99,19 @@ call_allocator(CFG, Liveness, SpillLimit, SpillIndex, Options, RegAllocMod,
TargetCtx, Options)
end.
-do_range_split(CFG0, Liveness, TgtMod, TgtCtx, Options) ->
- case proplists:get_bool(ra_restore_reuse, Options) of
+do_range_split(CFG0, Liveness0, TgtMod, TgtCtx, Options) ->
+ {CFG2, Liveness1} =
+ case proplists:get_bool(ra_restore_reuse, Options) of
+ true ->
+ CFG1 = hipe_restore_reuse:split(CFG0, Liveness0, TgtMod, TgtCtx),
+ {CFG1, TgtMod:analyze(CFG1, TgtCtx)};
+ false ->
+ {CFG0, Liveness0}
+ end,
+ case proplists:get_bool(ra_range_split, Options) of
true ->
- CFG1 = hipe_restore_reuse:split(CFG0, Liveness, TgtMod, TgtCtx),
- {CFG1, TgtMod:analyze(CFG1, TgtCtx)};
+ CFG3 = hipe_range_split:split(CFG2, Liveness1, TgtMod, TgtCtx, Options),
+ {CFG3, TgtMod:analyze(CFG3, TgtCtx)};
false ->
- {CFG0, Liveness}
+ {CFG2, Liveness1}
end.