aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-04 10:53:40 +0200
committerBjörn Gustavsson <[email protected]>2012-10-09 15:24:40 +0200
commit8c9863948b440f2741b6df3ffda2c6dd2b7b363c (patch)
tree68f08d615672add70c701bf6bf796513228d9367 /lib/compiler/src/compile.erl
parente38dc4aaeb769aaf531c66e508f475ed24c25ffd (diff)
downloadotp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.tar.gz
otp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.tar.bz2
otp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.zip
Introduce the mandatory beam_a and beam_z passes
Introduce the mandary beam_a pass that will be run directly after code generation, and the mandatory beam_z pass that will be run just before beam_asm. Since these passes surround the optimizations, beam_a can (for example) do instruction renaming to simplify the optimization passes and beam_z can undo those renamings.
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r--lib/compiler/src/compile.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 2f374e6fb0..0346c0441a 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -632,7 +632,8 @@ kernel_passes() ->
asm_passes() ->
%% Assembly level optimisations.
[{delay,
- [{unless,no_postopt,
+ [{pass,beam_a},
+ {unless,no_postopt,
[{pass,beam_block},
{iff,dblk,{listing,"block"}},
{unless,no_except,{pass,beam_except}},
@@ -666,6 +667,7 @@ asm_passes() ->
[?pass(beam_unused_labels),
{pass,beam_clean}]},
+ {pass,beam_z},
{iff,dopt,{listing,"optimize"}},
{iff,'S',{listing,"S"}},
{iff,'to_asm',{done,"S"}}]},