diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 18:01:18 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 18:01:18 +0000 |
commit | a1ddb869e0e3d5284a4065fe19e0390f16303611 (patch) | |
tree | fb50da4819a8e8a71c5d1bc4aa7a80c441cac4f3 /gcc/emit-rtl.c | |
parent | b3fd46a0f94ccfc993aa26f42db901c8f486c8b1 (diff) | |
download | gcc-a1ddb869e0e3d5284a4065fe19e0390f16303611.tar.gz |
* rtlanal.c (add_reg_note): New function.
* rtl.h (add_reg_note): Declare.
* auto-inc-dec.c (attempt_change): Use add_reg_note.
* bb-reorder.c (add_reg_crossing_jump_notes): Likewise.
* builtins.c (expand_builtin_longjmp): Likewise.
(expand_builtin_nonlocal_goto): Likewise.
* calls.c (emit_call_1, expand_call): Likewise.
* cfgexpand.c (add_reg_br_prob_note): Likewise.
* cfglayout.c (fixup_reorder_chain): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
(commit_one_edge_insertion): Likewise.
* combine.c (move_deaths, distribute_notes): Likewise.
* df-problems.c (df_set_note): Likewise.
* emit-rtl.c (link_cc0_insns, try_split): Likewise.
(set_unique_reg_note): Likewise.
(emit_copy_of_insn_after): Likewise.
* expr.c (expand_expr_real): Likewise.
* gcse.c (add_label_notes): Likewise.
* haifa-sched.c (create_check_block_twin): Likewise.
* jump.c (mark_jump_label_1): Likewise.
* loop-doloop.c (add_test, doloop_modify): Likewise.
* loop-unswitch.c (compare_and_jump_seq): Likewise.
* lower-subreg.c (move_eh_region_note): Likewise.
* optabs.c (emit_libcall_block): Likewise.
* predict.c (predict_insn): Likewise.
(combine_predictions_for_insn): Likewise.
* recog.c (peephole2_optimize): Likewise.
* regmove.c (try_auto_increment): Likewise.
* reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (fixup_eh_region_note): Likewise.
(reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise.
* reorg.c (delete_prior_computation): Likewise.
(delete_computation, dbr_schedule): Likewise.
* config/pa/pa.c (legitimize_pic_address): Likewise.
* config/sh/sh.c (sh_reorg): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 418da241b66..22c7979a773 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3044,9 +3044,8 @@ link_cc0_insns (rtx insn) if (NONJUMP_INSN_P (user) && GET_CODE (PATTERN (user)) == SEQUENCE) user = XVECEXP (PATTERN (user), 0, 0); - REG_NOTES (user) = gen_rtx_INSN_LIST (REG_CC_SETTER, insn, - REG_NOTES (user)); - REG_NOTES (insn) = gen_rtx_INSN_LIST (REG_CC_USER, user, REG_NOTES (insn)); + add_reg_note (user, REG_CC_SETTER, insn); + add_reg_note (insn, REG_CC_USER, user); } /* Return the next insn that uses CC0 after INSN, which is assumed to @@ -3223,10 +3222,7 @@ try_split (rtx pat, rtx trial, int last) is responsible for this step using split_branch_probability variable. */ gcc_assert (njumps == 1); - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_BR_PROB, - GEN_INT (probability), - REG_NOTES (insn)); + add_reg_note (insn, REG_BR_PROB, GEN_INT (probability)); } } } @@ -3257,10 +3253,7 @@ try_split (rtx pat, rtx trial, int last) if (CALL_P (insn) || (flag_non_call_exceptions && INSN_P (insn) && may_trap_p (PATTERN (insn)))) - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_EH_REGION, - XEXP (note, 0), - REG_NOTES (insn)); + add_reg_note (insn, REG_EH_REGION, XEXP (note, 0)); } break; @@ -3269,10 +3262,7 @@ try_split (rtx pat, rtx trial, int last) for (insn = insn_last; insn != NULL_RTX; insn = PREV_INSN (insn)) { if (CALL_P (insn)) - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_NOTE_KIND (note), - XEXP (note, 0), - REG_NOTES (insn)); + add_reg_note (insn, REG_NOTE_KIND (note), XEXP (note, 0)); } break; @@ -3280,10 +3270,7 @@ try_split (rtx pat, rtx trial, int last) for (insn = insn_last; insn != NULL_RTX; insn = PREV_INSN (insn)) { if (JUMP_P (insn)) - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_NOTE_KIND (note), - XEXP (note, 0), - REG_NOTES (insn)); + add_reg_note (insn, REG_NOTE_KIND (note), XEXP (note, 0)); } break; @@ -3294,8 +3281,7 @@ try_split (rtx pat, rtx trial, int last) rtx reg = XEXP (note, 0); if (!FIND_REG_INC_NOTE (insn, reg) && for_each_rtx (&PATTERN (insn), find_auto_inc, reg) > 0) - REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, reg, - REG_NOTES (insn)); + add_reg_note (insn, REG_INC, reg); } break; #endif @@ -4600,7 +4586,6 @@ rtx set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum) { rtx note = find_reg_note (insn, kind, NULL_RTX); - rtx new_note = NULL; switch (kind) { @@ -4638,8 +4623,7 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum) break; } - new_note = gen_rtx_EXPR_LIST (kind, datum, REG_NOTES (insn)); - REG_NOTES (insn) = new_note; + add_reg_note (insn, kind, datum); switch (kind) { @@ -5525,13 +5509,10 @@ emit_copy_of_insn_after (rtx insn, rtx after) if (REG_NOTE_KIND (link) != REG_LABEL_OPERAND) { if (GET_CODE (link) == EXPR_LIST) - REG_NOTES (new) - = gen_rtx_EXPR_LIST (REG_NOTE_KIND (link), - copy_insn_1 (XEXP (link, 0)), REG_NOTES (new)); + add_reg_note (new, REG_NOTE_KIND (link), + copy_insn_1 (XEXP (link, 0))); else - REG_NOTES (new) - = gen_rtx_INSN_LIST (REG_NOTE_KIND (link), - XEXP (link, 0), REG_NOTES (new)); + add_reg_note (new, REG_NOTE_KIND (link), XEXP (link, 0)); } INSN_CODE (new) = INSN_CODE (insn); |