diff options
author | Björn Gustavsson <[email protected]> | 2016-12-09 12:17:26 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-12-09 14:31:59 +0100 |
commit | ebdf6e688c68b95e0c0b6f9b00b9f9c26f83525e (patch) | |
tree | fa3b38db53732a625ad88e66b9fe990581bd21f1 /lib/compiler/src/beam_type.erl | |
parent | b29787dbcc53b4ab1b5bfedd1ad45708d0f99dc1 (diff) | |
download | otp-ebdf6e688c68b95e0c0b6f9b00b9f9c26f83525e.tar.gz otp-ebdf6e688c68b95e0c0b6f9b00b9f9c26f83525e.tar.bz2 otp-ebdf6e688c68b95e0c0b6f9b00b9f9c26f83525e.zip |
beam_type: Minimize number of regs in test_heap instructions
The beam_type may pass move and recalculates test_heap instructions.
The number of live registers are not always the lowest. Minimize the
number of registers by running beam_utils:live_opt/1 one more time.
Diffstat (limited to 'lib/compiler/src/beam_type.erl')
-rw-r--r-- | lib/compiler/src/beam_type.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl index d324580cba..9866dcd070 100644 --- a/lib/compiler/src/beam_type.erl +++ b/lib/compiler/src/beam_type.erl @@ -34,7 +34,8 @@ function({function,Name,Arity,CLabel,Asm0}) -> try Asm1 = beam_utils:live_opt(Asm0), Asm2 = opt(Asm1, [], tdb_new()), - Asm = beam_utils:delete_live_annos(Asm2), + Asm3 = beam_utils:live_opt(Asm2), + Asm = beam_utils:delete_live_annos(Asm3), {function,Name,Arity,CLabel,Asm} catch Class:Error -> |