diff options
author | Björn Gustavsson <[email protected]> | 2019-04-13 09:20:16 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-05-23 12:16:56 +0200 |
commit | 3bfd8439d07bee689d2a2877e01a827cab1f028c (patch) | |
tree | b56741674c57f341b115e7369e0aebb635845532 /lib/compiler/src/beam_ssa_opt.erl | |
parent | 59a813cb8d9f687b612782be0103643837b2de8e (diff) | |
download | otp-3bfd8439d07bee689d2a2877e01a827cab1f028c.tar.gz otp-3bfd8439d07bee689d2a2877e01a827cab1f028c.tar.bz2 otp-3bfd8439d07bee689d2a2877e01a827cab1f028c.zip |
Implement '==' optimization in beam_ssa_type
`=:=` is faster than `==`, so when they would return the same result,
we want to replace `==` with `=:=`. There is currently such an optimization
in sys_core_fold, but the optimimization will be more effective if
done in beam_ssa_type because beam_ssa_type has better type information.
Diffstat (limited to 'lib/compiler/src/beam_ssa_opt.erl')
-rw-r--r-- | lib/compiler/src/beam_ssa_opt.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_ssa_opt.erl b/lib/compiler/src/beam_ssa_opt.erl index 90c0d3cf16..0c8cefe74d 100644 --- a/lib/compiler/src/beam_ssa_opt.erl +++ b/lib/compiler/src/beam_ssa_opt.erl @@ -157,6 +157,8 @@ repeated_passes(Opts) -> ?PASS(ssa_opt_dead), ?PASS(ssa_opt_cse), ?PASS(ssa_opt_tail_phis), + ?PASS(ssa_opt_tuple_size), + ?PASS(ssa_opt_record), ?PASS(ssa_opt_type_continue)], %Must run after ssa_opt_dead to %clean up phi nodes. passes_1(Ps, Opts). |