summaryrefslogtreecommitdiff
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2019-04-14 07:45:54 +0200
committerBjörn Gustavsson <bjorn@erlang.org>2019-05-14 16:15:01 +0200
commit331de9413f4f82db41dfbe60f521b21880b6688e (patch)
treee710f5d7376ec629ae844198e4a4b6f94e434985 /lib/compiler/src/compile.erl
parent19fdd7e4a7166834cf46845a372583fb29cc5338 (diff)
downloaderlang-331de9413f4f82db41dfbe60f521b21880b6688e.tar.gz
Eliminate the beam_except pass
The beam_except pass rewrites certain calls `erlang:error/{1,2}` to use specialized instructions for common exceptions such as `{badmatch,Term}`. Move this optimization to `beam_ssa_pre_codegen` and `beam_ssa_codegen`. The main reason for this change is that optimization passes operating on SSA code are easier to maintain than optimization passes working on BEAM code.
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r--lib/compiler/src/compile.erl3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 28db8986ff..17ec986d82 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -860,8 +860,6 @@ asm_passes() ->
{unless,no_postopt,
[{pass,beam_block},
{iff,dblk,{listing,"block"}},
- {unless,no_except,{pass,beam_except}},
- {iff,dexcept,{listing,"except"}},
{unless,no_jopt,{pass,beam_jump}},
{iff,djmp,{listing,"jump"}},
{unless,no_peep_opt,{pass,beam_peep}},
@@ -2095,7 +2093,6 @@ pre_load() ->
beam_block,
beam_clean,
beam_dict,
- beam_except,
beam_flatten,
beam_jump,
beam_kernel_to_ssa,