aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_ssa.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-04-14 07:45:54 +0200
committerBjörn Gustavsson <[email protected]>2019-05-14 16:15:01 +0200
commit331de9413f4f82db41dfbe60f521b21880b6688e (patch)
treee710f5d7376ec629ae844198e4a4b6f94e434985 /lib/compiler/src/beam_ssa.erl
parent19fdd7e4a7166834cf46845a372583fb29cc5338 (diff)
downloadotp-331de9413f4f82db41dfbe60f521b21880b6688e.tar.gz
otp-331de9413f4f82db41dfbe60f521b21880b6688e.tar.bz2
otp-331de9413f4f82db41dfbe60f521b21880b6688e.zip
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/beam_ssa.erl')
-rw-r--r--lib/compiler/src/beam_ssa.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_ssa.erl b/lib/compiler/src/beam_ssa.erl
index a9977b0b1d..e8b77e382f 100644
--- a/lib/compiler/src/beam_ssa.erl
+++ b/lib/compiler/src/beam_ssa.erl
@@ -118,7 +118,7 @@
%% Primops only used internally during code generation.
-type cg_prim_op() :: 'bs_get' | 'bs_match_string' | 'bs_restore' | 'bs_skip' |
- 'copy' | 'put_tuple_arity' | 'put_tuple_element' |
+ 'copy' | 'match_fail' | 'put_tuple_arity' | 'put_tuple_element' |
'set_tuple_element'.
-import(lists, [foldl/3,keyfind/3,mapfoldl/3,member/2,reverse/1]).