aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-05 09:05:21 +0100
committerBjörn Gustavsson <[email protected]>2011-12-06 12:21:46 +0100
commit6c91e303fe844ec9a795216bb9e4d39e760cecb8 (patch)
treed60be574f359d972b433076659d2ec359cbe15e2 /lib/compiler/src/compile.erl
parenta02e9fc9be7ceea4185bd7b1b74cdd9922d4ce4e (diff)
downloadotp-6c91e303fe844ec9a795216bb9e4d39e760cecb8.tar.gz
otp-6c91e303fe844ec9a795216bb9e4d39e760cecb8.tar.bz2
otp-6c91e303fe844ec9a795216bb9e4d39e760cecb8.zip
Teach the compiler the 'no_dead' option
To facilitate debugging of compiler bugs, teach the compiler the 'no_dead' option. Since the beam_dead pass used to do the necessary splitting of basic blocks to expose all labels, we must move that splitting into a separate pass that is always run.
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 8815cfb26f..a17a10046e 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -633,7 +633,9 @@ asm_passes() ->
{iff,dbool,{listing,"bool"}},
{unless,no_topt,{pass,beam_type}},
{iff,dtype,{listing,"type"}},
- {pass,beam_dead}, %Must always run since it splits blocks.
+ {pass,beam_split},
+ {iff,dsplit,{listing,"split"}},
+ {unless,no_dead,{pass,beam_dead}},
{iff,ddead,{listing,"dead"}},
{unless,no_jopt,{pass,beam_jump}},
{iff,djmp,{listing,"jump"}},