calls.c (ECF_ALWAYS_RETURN): New constant.
* 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. From-SVN: r44722
This commit is contained in:
parent
82423cbad3
commit
9d98f8f9c4
|
@ -1,3 +1,13 @@
|
|||
Wed Aug 8 21:06:43 CEST 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* 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.
|
||||
|
||||
2001-08-07 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses.
|
||||
|
|
11
gcc/calls.c
11
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;
|
||||
|
||||
|
|
|
@ -2517,6 +2517,7 @@ need_fake_edge_p (insn)
|
|||
if ((GET_CODE (insn) == CALL_INSN
|
||||
&& !SIBLING_CALL_P (insn)
|
||||
&& !find_reg_note (insn, REG_NORETURN, NULL)
|
||||
&& !find_reg_note (insn, REG_ALWAYS_RETURN, NULL)
|
||||
&& !CONST_OR_PURE_CALL_P (insn)))
|
||||
return true;
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ const char * const reg_note_name[] =
|
|||
"REG_EXEC_COUNT", "REG_NOALIAS", "REG_SAVE_AREA", "REG_BR_PRED",
|
||||
"REG_FRAME_RELATED_EXPR", "REG_EH_CONTEXT", "REG_EH_REGION",
|
||||
"REG_EH_RETHROW", "REG_SAVE_NOTE", "REG_MAYBE_DEAD", "REG_NORETURN",
|
||||
"REG_NON_LOCAL_GOTO", "REG_SETJMP"
|
||||
"REG_NON_LOCAL_GOTO", "REG_SETJMP", "REG_ALWAYS_RETURN"
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -566,7 +566,10 @@ enum reg_note
|
|||
|
||||
/* This kind of note is generated at each to `setjmp',
|
||||
and similar functions that can return twice. */
|
||||
REG_SETJMP
|
||||
REG_SETJMP,
|
||||
|
||||
/* Indicate calls that always returns. */
|
||||
REG_ALWAYS_RETURN
|
||||
};
|
||||
|
||||
/* The base value for branch probability notes. */
|
||||
|
@ -1952,7 +1955,8 @@ enum libcall_type
|
|||
LCT_CONST_MAKE_BLOCK = 3,
|
||||
LCT_PURE_MAKE_BLOCK = 4,
|
||||
LCT_NORETURN = 5,
|
||||
LCT_THROW = 6
|
||||
LCT_THROW = 6,
|
||||
LCT_ALWAYS_RETURN = 7
|
||||
};
|
||||
|
||||
extern void emit_library_call PARAMS ((rtx, enum libcall_type,
|
||||
|
|
Loading…
Reference in New Issue