diff options
author | Björn Gustavsson <[email protected]> | 2019-02-07 16:16:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-02-07 16:16:04 +0100 |
commit | 20b76b6c535bf0279950ea9ef5d02c52a9f8b51c (patch) | |
tree | 3708bfdf0ed1473dec68b41bfe7d64458da5abb5 /lib/compiler/src/beam_ssa_pre_codegen.erl | |
parent | 260935595647eb2c4ca94c4c853c2b6065610272 (diff) | |
parent | 077cfc59f1dca89aa1231ce291100aa4b33c50e0 (diff) | |
download | otp-20b76b6c535bf0279950ea9ef5d02c52a9f8b51c.tar.gz otp-20b76b6c535bf0279950ea9ef5d02c52a9f8b51c.tar.bz2 otp-20b76b6c535bf0279950ea9ef5d02c52a9f8b51c.zip |
Merge pull request #2135 from bjorng/bjorn/compiler/optimize-dominators
Optimize ssa_opt_sink for huge functions
Diffstat (limited to 'lib/compiler/src/beam_ssa_pre_codegen.erl')
-rw-r--r-- | lib/compiler/src/beam_ssa_pre_codegen.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_ssa_pre_codegen.erl b/lib/compiler/src/beam_ssa_pre_codegen.erl index ad57a45ef2..df4de8d7bd 100644 --- a/lib/compiler/src/beam_ssa_pre_codegen.erl +++ b/lib/compiler/src/beam_ssa_pre_codegen.erl @@ -874,7 +874,7 @@ fix_tuples(#st{ssa=Blocks0,cnt=Count0}=St) -> %% a stack frame or set up a stack frame with a different size. place_frames(#st{ssa=Blocks}=St) -> - Doms = beam_ssa:dominators(Blocks), + {Doms,_} = beam_ssa:dominators(Blocks), Ls = beam_ssa:rpo(Blocks), Tried = gb_sets:empty(), Frames0 = [], @@ -1001,7 +1001,7 @@ phi_predecessors(L, Blocks) -> is_dominated_by(L, DomBy, Doms) -> DominatedBy = map_get(L, Doms), - ordsets:is_element(DomBy, DominatedBy). + member(DomBy, DominatedBy). %% need_frame(#b_blk{}) -> true|false. %% Test whether any of the instructions in the block requires a stack frame. |