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/sched-deps.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/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 69397a9542c..0893ee1d544 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -1017,13 +1017,17 @@ sched_analyze_insn (deps, x, insn, loop_notes) /* Mark registers CLOBBERED or used by called function. */ if (GET_CODE (insn) == CALL_INSN) - for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) - { - if (GET_CODE (XEXP (link, 0)) == CLOBBER) - sched_analyze_1 (deps, XEXP (link, 0), insn); - else - sched_analyze_2 (deps, XEXP (link, 0), insn); - } + { + for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) + { + if (GET_CODE (XEXP (link, 0)) == CLOBBER) + sched_analyze_1 (deps, XEXP (link, 0), insn); + else + sched_analyze_2 (deps, XEXP (link, 0), insn); + } + if (find_reg_note (insn, REG_SETJMP, NULL)) + schedule_barrier_found = 1; + } if (GET_CODE (insn) == JUMP_INSN) { @@ -1094,8 +1098,7 @@ sched_analyze_insn (deps, x, insn, loop_notes) if (INTVAL (XEXP (link, 0)) == NOTE_INSN_LOOP_BEG || INTVAL (XEXP (link, 0)) == NOTE_INSN_LOOP_END || INTVAL (XEXP (link, 0)) == NOTE_INSN_EH_REGION_BEG - || INTVAL (XEXP (link, 0)) == NOTE_INSN_EH_REGION_END - || INTVAL (XEXP (link, 0)) == NOTE_INSN_SETJMP) + || INTVAL (XEXP (link, 0)) == NOTE_INSN_EH_REGION_END) schedule_barrier_found = 1; link = XEXP (link, 1); @@ -1277,15 +1280,14 @@ sched_analyze (deps, head, tail) past a void call (i.e. it does not explicitly set the hard return reg). */ - /* If this call is followed by a NOTE_INSN_SETJMP, then assume that + /* If this call has REG_SETJMP, then assume that all registers, not just hard registers, may be clobbered by this call. */ /* Insn, being a CALL_INSN, magically depends on `last_function_call' already. */ - if (NEXT_INSN (insn) && GET_CODE (NEXT_INSN (insn)) == NOTE - && NOTE_LINE_NUMBER (NEXT_INSN (insn)) == NOTE_INSN_SETJMP) + if (find_reg_note (insn, REG_SETJMP, NULL)) { for (i = 0; i < deps->max_reg; i++) { @@ -1301,16 +1303,6 @@ sched_analyze (deps, head, tail) free_INSN_LIST_list (®_last->uses); } reg_pending_sets_all = 1; - - /* Add a pair of REG_SAVE_NOTEs which we will later - convert back into a NOTE_INSN_SETJMP note. See - reemit_notes for why we use a pair of NOTEs. */ - REG_NOTES (insn) = alloc_EXPR_LIST (REG_SAVE_NOTE, - GEN_INT (0), - REG_NOTES (insn)); - REG_NOTES (insn) = alloc_EXPR_LIST (REG_SAVE_NOTE, - GEN_INT (NOTE_INSN_SETJMP), - REG_NOTES (insn)); } else { @@ -1375,9 +1367,7 @@ sched_analyze (deps, head, tail) && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG || NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG - || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END - || (NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP - && GET_CODE (PREV_INSN (insn)) != CALL_INSN))) + || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)) { rtx rtx_region; |