diff options
author | Magnus Lång <[email protected]> | 2016-06-03 18:10:35 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-09-02 15:59:16 +0200 |
commit | b0c5244f6258f22dc30930b66deae81b3ac942a5 (patch) | |
tree | 6ef55e2c8757bba49e49f31791808d5c65a5096c /lib/hipe/regalloc/hipe_regalloc_loop.erl | |
parent | 85bd166647e7f260fd665eb44da9151c0d88f208 (diff) | |
download | otp-b0c5244f6258f22dc30930b66deae81b3ac942a5.tar.gz otp-b0c5244f6258f22dc30930b66deae81b3ac942a5.tar.bz2 otp-b0c5244f6258f22dc30930b66deae81b3ac942a5.zip |
hipe: Add IG partitioning to hipe_regalloc_prepass
Diffstat (limited to 'lib/hipe/regalloc/hipe_regalloc_loop.erl')
-rw-r--r-- | lib/hipe/regalloc/hipe_regalloc_loop.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/hipe/regalloc/hipe_regalloc_loop.erl b/lib/hipe/regalloc/hipe_regalloc_loop.erl index 33a7130ff1..4a933a890c 100644 --- a/lib/hipe/regalloc/hipe_regalloc_loop.erl +++ b/lib/hipe/regalloc/hipe_regalloc_loop.erl @@ -43,8 +43,13 @@ ra_common(Defun, SpillIndex, Options, RegAllocMod, TargetMod) -> alloc(Defun, CFG, SpillLimit, SpillIndex, Options, RegAllocMod, TargetMod) -> ?inc_counter(ra_iteration_counter, 1), {Coloring, _NewSpillIndex, Liveness} = - hipe_regalloc_prepass:regalloc( - RegAllocMod, CFG, SpillIndex, SpillLimit, TargetMod, Options), + case proplists:get_bool(ra_prespill, Options) of + true -> + hipe_regalloc_prepass:regalloc( + RegAllocMod, CFG, SpillIndex, SpillLimit, TargetMod, Options); + false -> + RegAllocMod:regalloc(CFG, SpillIndex, SpillLimit, TargetMod, Options) + end, {NewDefun, DidSpill} = TargetMod:check_and_rewrite(Defun, Coloring), case DidSpill of false -> %% No new temps, we are done. |