Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
2935-beam_ssa_opt-Repeat-the-beam_ssa_opt_try-p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2935-beam_ssa_opt-Repeat-the-beam_ssa_opt_try-pass.patch of Package erlang
From 5218d3aa116e74417c73824c3377989657778cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Sat, 20 Feb 2021 09:14:56 +0100 Subject: [PATCH 5/6] beam_ssa_opt: Repeat the beam_ssa_opt_try pass The elimination of try/catch and strength reduction of try/catch can give the type optimization pass more opportunities for optimization. Note that there is no longer any need to call beam_ssa:trim_unreachable/1, because it will be done implicitly by the type optimization pass. --- lib/compiler/src/beam_ssa_opt.erl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/compiler/src/beam_ssa_opt.erl b/lib/compiler/src/beam_ssa_opt.erl index 486d33ef05..68445906fb 100644 --- a/lib/compiler/src/beam_ssa_opt.erl +++ b/lib/compiler/src/beam_ssa_opt.erl @@ -284,6 +284,7 @@ repeated_passes(Opts) -> ?PASS(ssa_opt_sink), ?PASS(ssa_opt_tuple_size), ?PASS(ssa_opt_record), + ?PASS(ssa_opt_try), ?PASS(ssa_opt_type_continue)], %Must run after ssa_opt_dead to %clean up phi nodes. passes_1(Ps, Opts). @@ -292,7 +293,6 @@ epilogue_passes(Opts) -> Ps = [?PASS(ssa_opt_type_finish), ?PASS(ssa_opt_float), ?PASS(ssa_opt_sw), - ?PASS(ssa_opt_try), %% Run live one more time to clean up after the previous %% epilogue passes. @@ -1388,11 +1388,7 @@ ssa_opt_try({#opt_st{ssa=Linear0}=St, FuncDb}) -> RevLinear = reduce_try(Linear0, []), EmptySet = sets:new([{version, 2}]), - Linear1 = trim_try(RevLinear, EmptySet, EmptySet, []), - - %% Unreachable blocks with tuple extractions will cause problems - %% for ssa_opt_sink. - Linear = beam_ssa:trim_unreachable(Linear1), + Linear = trim_try(RevLinear, EmptySet, EmptySet, []), {St#opt_st{ssa=Linear}, FuncDb}. -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor