diff options
author | Björn Gustavsson <[email protected]> | 2015-08-05 19:35:45 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-08-21 15:53:25 +0200 |
commit | f3cc9d1b16d86124a70f5dd0609113ec6e3b4dcf (patch) | |
tree | a23616df3e95a2733c16cdd046597a14a92faf61 /lib/compiler | |
parent | b4030b60b58a681b2dea5453fbc36f7f4cc41bd8 (diff) | |
download | otp-f3cc9d1b16d86124a70f5dd0609113ec6e3b4dcf.tar.gz otp-f3cc9d1b16d86124a70f5dd0609113ec6e3b4dcf.tar.bz2 otp-f3cc9d1b16d86124a70f5dd0609113ec6e3b4dcf.zip |
beam_block: Eliminate redundant wasteful call to opt/1
opt_alloc/1 makes a redundant call to opt/1. It is redundant because
the opt/1 function has already been applied to the instruction
sequence prior to calling opt_alloc/1.
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index 2def3de7f3..4861a2d7ec 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -346,7 +346,7 @@ is_transparent(_, _) -> false. %% Optimises all allocate instructions. opt_alloc([{set,[],[],{alloc,R,{_,Ns,Nh,[]}}}|Is]) -> - [{set,[],[],opt_alloc(Is, Ns, Nh, R)}|opt(Is)]; + [{set,[],[],opt_alloc(Is, Ns, Nh, R)}|Is]; opt_alloc([I|Is]) -> [I|opt_alloc(Is)]; opt_alloc([]) -> []. |