diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-07 20:24:08 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-07 20:24:08 +0000 |
commit | 9239aee664338dfa16b622edaa5a9c201e9ffd20 (patch) | |
tree | 60a5182f2490898a51da85e16138b7f79e245443 /gcc/resource.c | |
parent | 4c088c24ab96eae88be5177016af7a58f9e416b9 (diff) | |
download | gcc-9239aee664338dfa16b622edaa5a9c201e9ffd20.tar.gz |
* calls.c (expand_call): Do not emit INSN_SETJMP note.
(emit_library_call_value_1): Likewise.
(emit_call_1): Emit REG_SETJMP note.
* cse.c (cse_end_of_basic_block): Use REG_SETJMP instead
of INSN_SETJMP
* cselib.c (cselib_process_insn): Likewise.
* flow.c (propagate_block): Likewise.
* loop.c (find_and_verify_loops): Likewise.
* reload.c (find_equiv_regs): Likewise.
* reload1.c (reload): Likewise.
* resource.c (mark_referenced_resources,
mark_set_resources): Likewise.
* sched-deps (sched_analyze_insn, sched_analyze): Likewise.
* final.c (final_scan_insn): Remove NOTE_INSN_SETJMP.
* haifa-sched.c (unlink_other_notes): Likewise.
(reemit_notes): Likewise.
* sched-ebb.c (sched_ebb): Likewise.
* sched-rgc.c (sched_region): Likewise.
* rtl.c (note_insn_name): Likewise.
(reg_note_name): Add REG_SETJMP
* rtl.h (reg_note): Add REG_SETJMP.
(insn_note): Remove NOTE_INSN_SETJMP.
* profile.c (branch_prob): Add fake edges for setjmp.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/resource.c')
-rw-r--r-- | gcc/resource.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/gcc/resource.c b/gcc/resource.c index 17f7d034d93..7a16e8bc442 100644 --- a/gcc/resource.c +++ b/gcc/resource.c @@ -326,13 +326,11 @@ mark_referenced_resources (x, res, include_delayed_effects) rtx insn = PREV_INSN (x); rtx sequence = 0; int seq_size = 0; - rtx next = NEXT_INSN (x); int i; /* If we are part of a delay slot sequence, point at the SEQUENCE. */ if (NEXT_INSN (insn) != x) { - next = NEXT_INSN (NEXT_INSN (insn)); sequence = PATTERN (NEXT_INSN (insn)); seq_size = XVECLEN (sequence, 0); if (GET_CODE (sequence) != SEQUENCE) @@ -353,7 +351,7 @@ mark_referenced_resources (x, res, include_delayed_effects) if (global_regs[i]) SET_HARD_REG_BIT (res->regs, i); - /* Check for a NOTE_INSN_SETJMP. If it exists, then we must + /* Check for a REG_SETJMP. If it exists, then we must assume that this call can need any register. This is done to be more conservative about how we handle setjmp. @@ -361,8 +359,7 @@ mark_referenced_resources (x, res, include_delayed_effects) registers ensures that a register will not be considered dead just because it crosses a setjmp call. A register should be considered dead only if the setjmp call returns non-zero. */ - if (next && GET_CODE (next) == NOTE - && NOTE_LINE_NUMBER (next) == NOTE_INSN_SETJMP) + if (find_reg_note (x, REG_SETJMP, NULL)) SET_HARD_REG_SET (res->regs); { @@ -667,8 +664,6 @@ mark_set_resources (x, res, in_dest, mark_type) if (mark_type == MARK_SRC_DEST_CALL) { - rtx next = NEXT_INSN (x); - rtx prev = PREV_INSN (x); rtx link; res->cc = res->memory = 1; @@ -676,21 +671,15 @@ mark_set_resources (x, res, in_dest, mark_type) if (call_used_regs[r] || global_regs[r]) SET_HARD_REG_BIT (res->regs, r); - /* If X is part of a delay slot sequence, then NEXT should be - the first insn after the sequence. */ - if (NEXT_INSN (prev) != x) - next = NEXT_INSN (NEXT_INSN (prev)); - for (link = CALL_INSN_FUNCTION_USAGE (x); link; link = XEXP (link, 1)) if (GET_CODE (XEXP (link, 0)) == CLOBBER) mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1, MARK_SRC_DEST); - /* Check for a NOTE_INSN_SETJMP. If it exists, then we must + /* Check for a REG_SETJMP. If it exists, then we must assume that this call can clobber any register. */ - if (next && GET_CODE (next) == NOTE - && NOTE_LINE_NUMBER (next) == NOTE_INSN_SETJMP) + if (find_reg_note (x, REG_SETJMP, NULL)) SET_HARD_REG_SET (res->regs); } |