diff options
author | Jan Hubicka <jh@suse.cz> | 2002-06-02 23:09:54 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2002-06-02 21:09:54 +0000 |
commit | ba4f7968b5abe75ba6c20eaa0de6fc88806deaef (patch) | |
tree | cefa93bd4b55c17cc93db52e0412035b33082f45 /gcc/emit-rtl.c | |
parent | 537fc532be12254466f5d19fbaf40dc5016d6f81 (diff) | |
download | gcc-ba4f7968b5abe75ba6c20eaa0de6fc88806deaef.zip gcc-ba4f7968b5abe75ba6c20eaa0de6fc88806deaef.tar.gz gcc-ba4f7968b5abe75ba6c20eaa0de6fc88806deaef.tar.bz2 |
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 8f8f701e..237f23d 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2175,8 +2175,8 @@ gen_label_rtx () { rtx label; - label = gen_rtx_CODE_LABEL (VOIDmode, 0, NULL_RTX, - NULL_RTX, label_num++, NULL, NULL); + label = gen_rtx_CODE_LABEL (VOIDmode, 0, NULL_RTX, NULL_RTX, + NULL, label_num++, NULL, NULL); LABEL_NUSES (label) = 0; LABEL_ALTERNATE_NAME (label) = NULL; @@ -3253,6 +3253,8 @@ make_insn_raw (pattern) INSN_CODE (insn) = -1; LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; + INSN_SCOPE (insn) = NULL; + BLOCK_FOR_INSN (insn) = NULL; #ifdef ENABLE_RTL_CHECKING if (insn @@ -3285,6 +3287,8 @@ make_jump_insn_raw (pattern) LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; JUMP_LABEL (insn) = NULL; + INSN_SCOPE (insn) = NULL; + BLOCK_FOR_INSN (insn) = NULL; return insn; } @@ -3305,6 +3309,8 @@ make_call_insn_raw (pattern) LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; CALL_INSN_FUNCTION_USAGE (insn) = NULL; + INSN_SCOPE (insn) = NULL; + BLOCK_FOR_INSN (insn) = NULL; return insn; } @@ -3369,8 +3375,8 @@ add_insn_after (insn, after) abort (); } - if (basic_block_for_insn - && (unsigned int) INSN_UID (after) < basic_block_for_insn->num_elements + if (GET_CODE (after) != BARRIER + && GET_CODE (insn) != BARRIER && (bb = BLOCK_FOR_INSN (after))) { set_block_for_insn (insn, bb); @@ -3438,8 +3444,8 @@ add_insn_before (insn, before) abort (); } - if (basic_block_for_insn - && (unsigned int) INSN_UID (before) < basic_block_for_insn->num_elements + if (GET_CODE (before) != BARRIER + && GET_CODE (insn) != BARRIER && (bb = BLOCK_FOR_INSN (before))) { set_block_for_insn (insn, bb); @@ -3518,8 +3524,7 @@ remove_insn (insn) if (stack == 0) abort (); } - if (basic_block_for_insn - && (unsigned int) INSN_UID (insn) < basic_block_for_insn->num_elements + if (GET_CODE (insn) != BARRIER && (bb = BLOCK_FOR_INSN (insn))) { if (INSN_P (insn)) @@ -3596,16 +3601,13 @@ reorder_insns (from, to, after) reorder_insns_nobb (from, to, after); - if (basic_block_for_insn - && (unsigned int) INSN_UID (after) < basic_block_for_insn->num_elements + if (GET_CODE (after) != BARRIER && (bb = BLOCK_FOR_INSN (after))) { rtx x; bb->flags |= BB_DIRTY; - if (basic_block_for_insn - && ((unsigned int) INSN_UID (from) - < basic_block_for_insn->num_elements) + if (GET_CODE (from) != BARRIER && (bb2 = BLOCK_FOR_INSN (from))) { if (bb2->end == to) @@ -3913,6 +3915,7 @@ emit_note_before (subtype, before) INSN_UID (note) = cur_insn_uid++; NOTE_SOURCE_FILE (note) = 0; NOTE_LINE_NUMBER (note) = subtype; + BLOCK_FOR_INSN (note) = NULL; add_insn_before (note, before); return note; @@ -4033,6 +4036,7 @@ emit_note_after (subtype, after) INSN_UID (note) = cur_insn_uid++; NOTE_SOURCE_FILE (note) = 0; NOTE_LINE_NUMBER (note) = subtype; + BLOCK_FOR_INSN (note) = NULL; add_insn_after (note, after); return note; } @@ -4057,6 +4061,7 @@ emit_line_note_after (file, line, after) INSN_UID (note) = cur_insn_uid++; NOTE_SOURCE_FILE (note) = file; NOTE_LINE_NUMBER (note) = line; + BLOCK_FOR_INSN (note) = NULL; add_insn_after (note, after); return note; } @@ -4152,14 +4157,15 @@ emit_insns_after (first, after) if (!first) return after; - if (basic_block_for_insn - && (unsigned int) INSN_UID (after) < basic_block_for_insn->num_elements + if (GET_CODE (after) != BARRIER && (bb = BLOCK_FOR_INSN (after))) { bb->flags |= BB_DIRTY; for (last = first; NEXT_INSN (last); last = NEXT_INSN (last)) - set_block_for_insn (last, bb); - set_block_for_insn (last, bb); + if (GET_CODE (last) != BARRIER) + set_block_for_insn (last, bb); + if (GET_CODE (last) != BARRIER) + set_block_for_insn (last, bb); if (bb->end == after) bb->end = last; } @@ -4295,6 +4301,7 @@ emit_note (file, line) INSN_UID (note) = cur_insn_uid++; NOTE_SOURCE_FILE (note) = file; NOTE_LINE_NUMBER (note) = line; + BLOCK_FOR_INSN (note) = NULL; add_insn (note); return note; } @@ -5212,6 +5219,8 @@ emit_copy_of_insn_after (insn, after) /* Update LABEL_NUSES. */ mark_jump_label (PATTERN (new), new, 0); + INSN_SCOPE (new) = INSN_SCOPE (insn); + /* Copy all REG_NOTES except REG_LABEL since mark_jump_label will make them. */ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) |