From 3c030e88e793d2aff78a76e9df248bc029c9048c Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 16 Sep 2001 20:21:30 +0000 Subject: basic-block.h (free_bb_for_insn): Declare. * 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. From-SVN: r45647 --- gcc/gcse.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) (limited to 'gcc/gcse.c') diff --git a/gcc/gcse.c b/gcc/gcse.c index a6ea791..8e3187b 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -3508,9 +3508,6 @@ handle_avail_expr (insn, expr) SET_DEST (expr_set)), insn_computes_expr); - /* Keep block number table up to date. */ - set_block_for_new_insns (new_insn, BLOCK_FOR_INSN (insn_computes_expr)); - /* Keep register set table up to date. */ record_one_set (REGNO (to), new_insn); @@ -4636,7 +4633,7 @@ insert_insn_end_bb (expr, bb, pre) } #endif /* FIXME: What if something in cc0/jump uses value set in new insn? */ - new_insn = emit_block_insn_before (pat, insn, bb); + new_insn = emit_insn_before (pat, insn); } /* Likewise if the last insn is a call, as will happen in the presence @@ -4674,13 +4671,10 @@ insert_insn_end_bb (expr, bb, pre) || NOTE_INSN_BASIC_BLOCK_P (insn)) insn = NEXT_INSN (insn); - new_insn = emit_block_insn_before (pat, insn, bb); + new_insn = emit_insn_before (pat, insn); } else - { - new_insn = emit_insn_after (pat, insn); - bb->end = new_insn; - } + new_insn = emit_insn_after (pat, insn); /* Keep block number table up to date. Note, PAT could be a multiple insn sequence, we have to make @@ -4690,8 +4684,6 @@ insert_insn_end_bb (expr, bb, pre) for (i = 0; i < XVECLEN (pat, 0); i++) { rtx insn = XVECEXP (pat, 0, i); - - set_block_for_insn (insn, bb); if (INSN_P (insn)) add_label_notes (PATTERN (insn), new_insn); @@ -4701,7 +4693,6 @@ insert_insn_end_bb (expr, bb, pre) else { add_label_notes (SET_SRC (pat), new_insn); - set_block_for_new_insns (new_insn, bb); /* Keep register set table up to date. */ record_one_set (regno, new_insn); @@ -4815,20 +4806,14 @@ pre_insert_copy_insn (expr, insn) int indx = expr->bitmap_index; rtx set = single_set (insn); rtx new_insn; - basic_block bb = BLOCK_FOR_INSN (insn); if (!set) abort (); new_insn = emit_insn_after (gen_move_insn (reg, SET_DEST (set)), insn); - /* Keep block number table up to date. */ - set_block_for_new_insns (new_insn, bb); - /* Keep register set table up to date. */ record_one_set (regno, new_insn); - if (insn == bb->end) - bb->end = new_insn; gcse_create_count++; @@ -6254,7 +6239,6 @@ update_ld_motion_stores (expr) copy = gen_move_insn ( reg, SET_SRC (pat)); new = emit_insn_before (copy, insn); record_one_set (REGNO (reg), new); - set_block_for_new_insns (new, BLOCK_FOR_INSN (insn)); SET_SRC (pat) = reg; /* un-recognize this pattern since it's probably different now. */ @@ -6753,11 +6737,6 @@ insert_insn_start_bb (insn, bb) insn = emit_insn_after (insn, prev); - if (prev == bb->end) - bb->end = insn; - - set_block_for_new_insns (insn, bb); - if (gcse_file) { fprintf (gcse_file, "STORE_MOTION insert store at start of BB %d:\n", @@ -6846,7 +6825,6 @@ replace_store_insn (reg, del, bb) insn = gen_move_insn (reg, SET_SRC (PATTERN (del))); insn = emit_insn_after (insn, del); - set_block_for_new_insns (insn, bb); if (gcse_file) { @@ -6858,12 +6836,6 @@ replace_store_insn (reg, del, bb) fprintf(gcse_file, "\n"); } - if (bb->end == del) - bb->end = insn; - - if (bb->head == del) - bb->head = insn; - delete_insn (del); } -- cgit v1.1