diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 19:35:42 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 19:35:42 +0000 |
commit | e30ff7b1ab5258353b65e688d90789dfb6f80d1e (patch) | |
tree | 2f06c97b51a57f4c825b3b7477b29a1a12ddc91a /gcc/except.c | |
parent | f9460785ffa75b1c23d2251de7d403d487a2d52e (diff) | |
download | gcc-e30ff7b1ab5258353b65e688d90789dfb6f80d1e.tar.gz |
PR middle-end/45566
* except.c (convert_to_eh_region_ranges): Emit queued no-region
notes from other section in hot/cold partitioning even if
last_action is -3. Increment call_site_base.
* g++.dg/tree-prof/partition3.C: New test.
* g++.dg/tree-prof/tree-prof.exp: Fix a comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/gcc/except.c b/gcc/except.c index 3e2bbfb1f75..66bf41005a6 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2421,30 +2421,33 @@ convert_to_eh_region_ranges (void) if (last_action != this_action || last_landing_pad != this_landing_pad) { + /* If there is a queued no-action region in the other section + with hot/cold partitioning, emit it now. */ + if (first_no_action_insn_before_switch) + { + gcc_assert (this_action != -1 + && last_action == (first_no_action_insn + ? -1 : -3)); + call_site = add_call_site (NULL_RTX, 0, 0); + note = emit_note_before (NOTE_INSN_EH_REGION_BEG, + first_no_action_insn_before_switch); + NOTE_EH_HANDLER (note) = call_site; + note = emit_note_after (NOTE_INSN_EH_REGION_END, + last_no_action_insn_before_switch); + NOTE_EH_HANDLER (note) = call_site; + gcc_assert (last_action != -3 + || (last_action_insn + == last_no_action_insn_before_switch)); + first_no_action_insn_before_switch = NULL_RTX; + last_no_action_insn_before_switch = NULL_RTX; + call_site_base++; + } /* If we'd not seen a previous action (-3) or the previous action was must-not-throw (-2), then we do not need an end note. */ if (last_action >= -1) { /* If we delayed the creation of the begin, do it now. */ - if (first_no_action_insn_before_switch) - { - call_site = add_call_site (NULL_RTX, 0, 0); - note - = emit_note_before (NOTE_INSN_EH_REGION_BEG, - first_no_action_insn_before_switch); - NOTE_EH_HANDLER (note) = call_site; - if (first_no_action_insn) - { - note - = emit_note_after (NOTE_INSN_EH_REGION_END, - last_no_action_insn_before_switch); - NOTE_EH_HANDLER (note) = call_site; - } - else - gcc_assert (last_action_insn - == last_no_action_insn_before_switch); - } if (first_no_action_insn) { call_site = add_call_site (NULL_RTX, 0, cur_sec); |