aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-08-05 19:35:45 +0200
committerBjörn Gustavsson <[email protected]>2015-08-21 15:53:25 +0200
commitf3cc9d1b16d86124a70f5dd0609113ec6e3b4dcf (patch)
treea23616df3e95a2733c16cdd046597a14a92faf61
parentb4030b60b58a681b2dea5453fbc36f7f4cc41bd8 (diff)
downloadotp-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.
-rw-r--r--lib/compiler/src/beam_block.erl2
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([]) -> [].