diff options
author | Magnus Lång <[email protected]> | 2017-03-23 22:03:03 +0100 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2017-03-23 22:03:03 +0100 |
commit | 3cf6a85eb32e173b533de47bcd530364ceb20dc5 (patch) | |
tree | caf9699746210fadffd36f5198344178892b942b /lib/hipe/regalloc/hipe_optimistic_regalloc.erl | |
parent | 84be7e0ec7c0c64f1beb418cdd09879822aca4b0 (diff) | |
download | otp-3cf6a85eb32e173b533de47bcd530364ceb20dc5.tar.gz otp-3cf6a85eb32e173b533de47bcd530364ceb20dc5.tar.bz2 otp-3cf6a85eb32e173b533de47bcd530364ceb20dc5.zip |
HiPE: Fix off-by-one in register allocators
hipe_regalloc_loop considers SpillLimit to be an inclusive lower bound,
the allocators considered it to be an exclusive lower bound. The
allocators are changed to also consider it an inclusive lower bound.
This caused the register allocators to occasionally spill the first
"unspillable" temporary. This caused a failure in a newly added
assertion when hipe-compiling dets_v9 on x86.
Diffstat (limited to 'lib/hipe/regalloc/hipe_optimistic_regalloc.erl')
-rw-r--r-- | lib/hipe/regalloc/hipe_optimistic_regalloc.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl index b96920cbcf..a019c46b90 100644 --- a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl +++ b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl @@ -1933,7 +1933,7 @@ findCheapest([Node|Nodes], IG, Cost, Cheapest, SpillLimit) -> %% limit are extremely expensive. getCost(Node, IG, SpillLimit) -> - case Node > SpillLimit of + case Node >= SpillLimit of true -> inf; false -> SpillCost = hipe_ig:node_spill_cost(Node, IG), |