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/calls.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/calls.c')
-rw-r--r-- | gcc/calls.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index e31900f33ae..8206b9cbbb8 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -610,6 +610,10 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_NORETURN, const0_rtx, REG_NOTES (call_insn)); + if (ecf_flags & ECF_RETURNS_TWICE) + REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_SETJMP, const0_rtx, + REG_NOTES (call_insn)); + SIBLING_CALL_P (call_insn) = ((ecf_flags & ECF_SIBCALL) != 0); /* Restore this now, so that we do defer pops for this call's args @@ -3152,9 +3156,9 @@ expand_call (exp, target, ignore) if nonvolatile values are live. For functions that cannot return, inform flow that control does not fall through. */ - if ((flags & (ECF_RETURNS_TWICE | ECF_NORETURN | ECF_LONGJMP)) || pass == 0) + if ((flags & (ECF_NORETURN | ECF_LONGJMP)) || pass == 0) { - /* The barrier or NOTE_INSN_SETJMP note must be emitted + /* The barrier must be emitted immediately after the CALL_INSN. Some ports emit more than just a CALL_INSN above, so we must search for it here. */ @@ -3167,13 +3171,7 @@ expand_call (exp, target, ignore) abort (); } - if (flags & ECF_RETURNS_TWICE) - { - emit_note_after (NOTE_INSN_SETJMP, last); - current_function_calls_setjmp = 1; - } - else - emit_barrier_after (last); + emit_barrier_after (last); } if (flags & ECF_LONGJMP) @@ -4086,9 +4084,9 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) if nonvolatile values are live. For functions that cannot return, inform flow that control does not fall through. */ - if (flags & (ECF_RETURNS_TWICE | ECF_NORETURN | ECF_LONGJMP)) + if (flags & (ECF_NORETURN | ECF_LONGJMP)) { - /* The barrier or NOTE_INSN_SETJMP note must be emitted + /* The barrier note must be emitted immediately after the CALL_INSN. Some ports emit more than just a CALL_INSN above, so we must search for it here. */ @@ -4101,13 +4099,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) abort (); } - if (flags & ECF_RETURNS_TWICE) - { - emit_note_after (NOTE_INSN_SETJMP, last); - current_function_calls_setjmp = 1; - } - else - emit_barrier_after (last); + emit_barrier_after (last); } /* Now restore inhibit_defer_pop to its actual original value. */ |