diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-07-02 09:44:47 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-07-02 09:44:47 +0000 |
commit | 82cea5e8bf532fda4f25f9a972154900978e3412 (patch) | |
tree | c41d1055ed81e4be8123db769b4f56695e7168f6 /gcc | |
parent | 2e2c9da012227ba12ce89b6a65179e6c830e7e4b (diff) | |
download | gcc-82cea5e8bf532fda4f25f9a972154900978e3412.zip gcc-82cea5e8bf532fda4f25f9a972154900978e3412.tar.gz gcc-82cea5e8bf532fda4f25f9a972154900978e3412.tar.bz2 |
cfgexpand.c (pass_expand::execute): Deal specially with instructions to be inserted on single successor edge of the...
* cfgexpand.c (pass_expand::execute): Deal specially with instructions
to be inserted on single successor edge of the entry block. Then call
commit_edge_insertions instead of inserting the instructions manually.
* cfgrtl.c (commit_edge_insertions): Do not verify flow info during
RTL expansion.
From-SVN: r272929
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 40 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 3 |
3 files changed, 25 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a19368c..c206ab6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-07-02 Eric Botcazou <ebotcazou@adacore.com> + + * cfgexpand.c (pass_expand::execute): Deal specially with instructions + to be inserted on single successor edge of the entry block. Then call + commit_edge_insertions instead of inserting the instructions manually. + * cfgrtl.c (commit_edge_insertions): Do not verify flow info during + RTL expansion. + 2019-07-02 Richard Biener <rguenther@suse.de> * tree-core.h (enum tree_index): Add TI_CHREC_DONT_KNOW and diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4e1ee70..1e84d2c 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6576,37 +6576,27 @@ pass_expand::execute (function *fun) split edges which edge insertions might do. */ rebuild_jump_labels (get_insns ()); - FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (fun), - EXIT_BLOCK_PTR_FOR_FN (fun), next_bb) + /* If we have a single successor to the entry block, put the pending insns + after parm birth, but before NOTE_INSNS_FUNCTION_BEG. */ + if (single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (fun))) { - edge e; - edge_iterator ei; - for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); ) + edge e = single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (fun)); + if (e->insns.r) { - if (e->insns.r) - { - rebuild_jump_labels_chain (e->insns.r); - /* Put insns after parm birth, but before - NOTE_INSNS_FUNCTION_BEG. */ - if (e->src == ENTRY_BLOCK_PTR_FOR_FN (fun) - && single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (fun))) - { - rtx_insn *insns = e->insns.r; - e->insns.r = NULL; - if (NOTE_P (parm_birth_insn) - && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG) - emit_insn_before_noloc (insns, parm_birth_insn, e->dest); - else - emit_insn_after_noloc (insns, parm_birth_insn, e->dest); - } - else - commit_one_edge_insertion (e); - } + rtx_insn *insns = e->insns.r; + e->insns.r = NULL; + rebuild_jump_labels_chain (insns); + if (NOTE_P (parm_birth_insn) + && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG) + emit_insn_before_noloc (insns, parm_birth_insn, e->dest); else - ei_next (&ei); + emit_insn_after_noloc (insns, parm_birth_insn, e->dest); } } + /* Otherwise, as well as for other edges, take the usual way. */ + commit_edge_insertions (); + /* We're done expanding trees to RTL. */ currently_expanding_to_rtl = 0; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index a6e4c1b..fb0350d 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2105,7 +2105,8 @@ commit_edge_insertions (void) which will be done by fixup_partitions. */ fixup_partitions (); - checking_verify_flow_info (); + if (!currently_expanding_to_rtl) + checking_verify_flow_info (); FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), EXIT_BLOCK_PTR_FOR_FN (cfun), next_bb) |