diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-08 19:07:47 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-08 19:07:47 +0000 |
commit | 6d8a270d07beab0b916f83bbb1ac0e5f9840edbe (patch) | |
tree | b641fa444ecc5e0162540715896c50029c4ef59f /gcc/calls.c | |
parent | bb388679983f5bb38e6bc9cc1139b29ed5d52973 (diff) | |
download | gcc-6d8a270d07beab0b916f83bbb1ac0e5f9840edbe.tar.gz |
* calls.c (ECF_ALWAYS_RETURN): New constant.
(emit_call_1): Add REG_ALWAYS_RETURN note if needed.
(expand_call): Use LCF_ALWAYS_RETURN for __bb_fork_func.
(emit_library_call_value_1): Handle LCT_ALWAYS_RETRUN.
* flow.c (need_fake_edge_p): Handle REG_ALWAYS_RETURN.
* rtl.c (reg_note_name): New name.
* rtl.h (enum reg_note): Add REG_ALWAYS_RETURN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 8206b9cbbb8..7d810696660 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -177,6 +177,8 @@ static int calls_function_1 PARAMS ((tree, int)); /* Nonzero if this is a call to a function that returns with the stack pointer depressed. */ #define ECF_SP_DEPRESSED 1024 +/* Nonzero if this call is known to always return. */ +#define ECF_ALWAYS_RETURN 2048 static void emit_call_1 PARAMS ((rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, rtx, @@ -609,6 +611,9 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, if (ecf_flags & ECF_NORETURN) REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_NORETURN, const0_rtx, REG_NOTES (call_insn)); + if (ecf_flags & ECF_ALWAYS_RETURN) + REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_ALWAYS_RETURN, const0_rtx, + REG_NOTES (call_insn)); if (ecf_flags & ECF_RETURNS_TWICE) REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_SETJMP, const0_rtx, @@ -2594,7 +2599,8 @@ expand_call (exp, target, ignore) is subject to race conditions, just as with multithreaded programs. */ - emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_fork_func"), 0, + emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_fork_func"), + LCT_ALWAYS_RETURN, VOIDmode, 0); } @@ -3546,6 +3552,9 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) case LCT_THROW: flags = ECF_NORETURN; break; + case LCT_ALWAYS_RETURN: + flags = ECF_ALWAYS_RETURN; + break; } fun = orgfun; |