diff options
author | Kostis Sagonas <[email protected]> | 2014-02-26 00:06:11 +0100 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2014-02-26 00:06:11 +0100 |
commit | c82da93ca6408eff459c379234ca7f0789160c27 (patch) | |
tree | 591dd3d667582af840c5dec28695564ccfede5a8 /lib/hipe/regalloc | |
parent | 98776a40609d1fa80292d2959708a8697f8cb756 (diff) | |
download | otp-c82da93ca6408eff459c379234ca7f0789160c27.tar.gz otp-c82da93ca6408eff459c379234ca7f0789160c27.tar.bz2 otp-c82da93ca6408eff459c379234ca7f0789160c27.zip |
Substitude uses of lists:reverse(L1) ++ L2 with lists:reverse(L1, L2)
Diffstat (limited to 'lib/hipe/regalloc')
-rw-r--r-- | lib/hipe/regalloc/hipe_ls_regalloc.erl | 4 | ||||
-rw-r--r-- | lib/hipe/regalloc/hipe_optimistic_regalloc.erl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/hipe/regalloc/hipe_ls_regalloc.erl b/lib/hipe/regalloc/hipe_ls_regalloc.erl index 4276b8f968..7a00a0534a 100644 --- a/lib/hipe/regalloc/hipe_ls_regalloc.erl +++ b/lib/hipe/regalloc/hipe_ls_regalloc.erl @@ -722,7 +722,7 @@ is_free(R, Free) -> is_free(R, Free, []). is_free(R, [{R,_}|Rest], Acc) -> - {true,lists:reverse(Acc)++Rest}; + {true, lists:reverse(Acc, Rest)}; is_free(R, [X|Rs],Acc) -> is_free(R, Rs, [X|Acc]); is_free(_, [], _) -> @@ -733,7 +733,7 @@ exists_free_register(Start, Regs) -> exists_free_register(Start, [{Phys, Start0}|Rest], Acc) when Start > Start0 -> - {true, Phys, lists:reverse(Acc)++Rest}; + {true, Phys, lists:reverse(Acc, Rest)}; exists_free_register(Start, [Free|Rest], Acc) -> exists_free_register(Start, Rest, [Free|Acc]); exists_free_register(_, [], _) -> diff --git a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl index 5bad31ade9..0278a896d2 100644 --- a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl +++ b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl @@ -958,9 +958,9 @@ splits_2({Cols, NonCols, OldSpillCost}, L, SpillCost) -> %% Merge two ordered sub-splits into one. spillCostOrderedMerge(Spl1, [], Spl) -> - lists:reverse(Spl) ++ Spl1; + lists:reverse(Spl, Spl1); spillCostOrderedMerge([], Spl2, Spl) -> - lists:reverse(Spl) ++ Spl2; + lists:reverse(Spl, Spl2); spillCostOrderedMerge(Spl1, Spl2, Spl) -> {_, _, SpillCost1} = hd(Spl1), {_, _, SpillCost2} = hd(Spl2), |