summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-16 20:21:30 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-16 20:21:30 +0000
commit9dda79157a315d9dafd21f6bf414129ae6a813cf (patch)
tree3f3b141a9f45004a367eed069d691638b036e04f /gcc/recog.c
parentc00e481c16b2a2036ff5f18f412d432e50f307d6 (diff)
downloadgcc-9dda79157a315d9dafd21f6bf414129ae6a813cf.tar.gz
* basic-block.h (free_bb_for_insn): Declare.
* bb-reorder.c (label_for_bb): Use block_label. (emit_jump_to_block_after): Remove. (insert_intra_1): Do not update block_for_insn. (insert_inter_bb_scope_notes): Likewise; update bb->end * cfg.c (free_bb_for_insn): New. (try_rediret_by_replacing_jump): Avoid set_block_for_new_insns call. (force_nonfallthru_and_redirect): Likewise; do not update BB boundaries. (commit_one_edge_insertion): Likewise. (commit_one_edge_insertion): Do not update BB boundary. (commit_edge_insertions): Do not call compute_bb_for_insn. * cfgbuild.c (find_basic_blocks): Do not free basic_block_for_insn. * cfgcleanup.c (merge_blocks_move_predecessor): Use reorder_insns_nobb. (merge_blocks_move_successor_nojumps): Likewise. (try_crossjump_to_edge): Do not update block_for_insn. * combine.c (combine_instructions): Remove compute_bb_for_insn call. * df.c (df_pattern_emit_later): Do not update BB boundary. (df_jump_pattern_emit_after): Likewise. (df_insn_move_before): Use emit_insn_before. * emit-rtl.c (try_split): Emit after trial to get bb boundary updated properly. (add_insn_after, add_insn_before, emit_insns_after): Update BB boundaries and basic_block_for_insn. (reorder_insns_nobb): Rename from reorder_insns. (reorder_insns): New. (emit_block_insn_before, emit_block_insn_after): Kill. * flow.c (check_function_return_warnings): Do not call compute_bb_for_insn; Do not free basic_block_for_insn. (attempt_auto_inc): Do not update basic_block_for_insn. * function.c (emit_return_into_block): Likewise; do not update BB boundaries. * gcse.c (handle_avail_expr): Do not update basic_block_for_insn. (insert_insn_end_bb): Use emit_insn_before; Likewise. (pre_insert_copy_insn): Likewise. (update_ld_motion_notes): Likewise. (insert_insn_start_bb): Likewise. (replace_store_insn): Likewise. * ifcvt.c (noce_process_if_block): Likewise. (if_convert): Do not call compute_bb_for_insn. * lcm.c (optimize_mode_switching): Do not update BB boundaries. Use emit_insn_before and emit_insn_after. * recog.c (split_all_insns): Do not update BB boundaries; Do not call compute_bb_for_insn. (peephole2_optimize): Do not update BB boundaries. * reg-stack.c (emit_pop_insn): Use emit_insn_after and emit_insn_before. (emit_swap_insn): Likewise. (convert_regs_1): Likewise. * reload1.c (reload): Call compute_bb_for_insn. * rtl.h (reorder_insns_nobb): Declare. * ssa.c (rename_equivalent_regs): Use emit_insn_before. * toplev.c (rest_of_compilation): Call free_bb_for_insn at places CFG is invalidated; do not call compute_bb_for_insn. * cfg.c (expunge_block): Invalidate BB structure. * (merge_blocks_nomove): Update properly BLOCK_FOR_INSN array. * cfg.c (verify_flow_info): Verify the basic_block_for_insn array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index c7d1dd7d34a..21de5e5f29b 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2742,10 +2742,14 @@ split_all_insns (upd_life)
last = split_insn (insn);
if (last)
{
+ /* The split sequence may include barrier, but the
+ BB boundary we are interested in will be set to previous
+ one. */
+
+ while (GET_CODE (last) == BARRIER)
+ last = PREV_INSN (last);
SET_BIT (blocks, i);
changed = 1;
- if (insn == bb->end)
- bb->end = last;
insn = last;
}
@@ -2759,7 +2763,6 @@ split_all_insns (upd_life)
if (changed)
{
- compute_bb_for_insn (get_max_uid ());
for (i = 0; i < n_basic_blocks; i++)
find_sub_basic_blocks (BASIC_BLOCK (i));
}
@@ -3061,14 +3064,8 @@ peephole2_optimize (dump_file)
i -= MAX_INSNS_PER_PEEP2 + 1;
/* Replace the old sequence with the new. */
+ try = emit_insn_after (try, peep2_insn_data[i].insn);
flow_delete_insn_chain (insn, peep2_insn_data[i].insn);
- try = emit_insn_after (try, prev);
-
- /* Adjust the basic block boundaries. */
- if (peep2_insn_data[i].insn == bb->end)
- bb->end = try;
- if (insn == bb->head)
- bb->head = NEXT_INSN (prev);
#ifdef HAVE_conditional_execution
/* With conditional execution, we cannot back up the