diff options
author | Magnus Lång <[email protected]> | 2016-09-01 17:21:25 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-09-05 19:16:26 +0200 |
commit | 1039c0196a7e643c63ce71b2c6daa2b78b3aa832 (patch) | |
tree | 7540338826d46f9850278b3af8ad84e2f4c76119 /lib/hipe/x86/hipe_x86_ra_naive.erl | |
parent | b4695b8088b8fc6f3844e33246849ed8bb8b18cf (diff) | |
download | otp-1039c0196a7e643c63ce71b2c6daa2b78b3aa832.tar.gz otp-1039c0196a7e643c63ce71b2c6daa2b78b3aa832.tar.bz2 otp-1039c0196a7e643c63ce71b2c6daa2b78b3aa832.zip |
hipe: Reuse liveness between regalloc iterations
This is sound because the liveness data structure only stores liveness
info at basic block boundaries, and the rewrites that happen in
TargetSpecific:check_and_rewrite/2 preserves all existing definitions
and uses, and all new liveness intervals, belonging to newly introduced
temporaries, are always local to a basic block, and thus do not show up
in the liveout or livein sets for the basic block.
Diffstat (limited to 'lib/hipe/x86/hipe_x86_ra_naive.erl')
-rw-r--r-- | lib/hipe/x86/hipe_x86_ra_naive.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hipe/x86/hipe_x86_ra_naive.erl b/lib/hipe/x86/hipe_x86_ra_naive.erl index 27e5af4aee..aeae01e98b 100644 --- a/lib/hipe/x86/hipe_x86_ra_naive.erl +++ b/lib/hipe/x86/hipe_x86_ra_naive.erl @@ -33,13 +33,13 @@ -endif. -module(?HIPE_X86_RA_NAIVE). --export([ra/3]). +-export([ra/4]). -include("../x86/hipe_x86.hrl"). -define(HIPE_INSTRUMENT_COMPILER, true). % enable instrumentation -include("../main/hipe.hrl"). -ra(CFG0, Coloring_fp, Options) -> +ra(CFG0, Liveness, Coloring_fp, Options) -> CFG = hipe_x86_cfg:map_bbs(fun do_bb/2, CFG0), NofSpilledFloats = count_non_float_spills(Coloring_fp), NofFloats = length(Coloring_fp), @@ -48,7 +48,7 @@ ra(CFG0, Coloring_fp, Options) -> NofSpilledFloats - NofFloats), TempMap = [], - {CFG, + {CFG, Liveness, TempMap}. do_bb(_Lbl, BB) -> |