From 6c91e303fe844ec9a795216bb9e4d39e760cecb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 5 Dec 2011 09:05:21 +0100 Subject: 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. --- lib/compiler/src/compile.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/compiler/src/compile.erl') 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"}}, -- cgit v1.2.3