summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/builtins.def2
-rw-r--r--gcc/calls.c4
-rw-r--r--gcc/tree-inline.c4
4 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 98e76ce27af..62feb5901f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-07 Richard Biener <rguenther@suse.de>
+
+ * calls.c (special_function_p): setjmp-like functions are leaf.
+ * builtins.def (BUILT_IN_SETJMP): setjmp is leaf.
+ * tree-inline.c (update_ssa_across_abnormal_edges): Remove assert.
+
2013-05-07 Sofiane Naci <sofiane.naci@arm.com>
* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>): call splitter.
diff --git a/gcc/builtins.def b/gcc/builtins.def
index b26eb247491..276f89c26e2 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -732,7 +732,7 @@ DEF_LIB_BUILTIN (BUILT_IN_REALLOC, "realloc", BT_FN_PTR_PTR_SIZE, ATTR_NO
DEF_GCC_BUILTIN (BUILT_IN_RETURN, "return", BT_FN_VOID_PTR, ATTR_NORETURN_NOTHROW_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_RETURN_ADDRESS, "return_address", BT_FN_PTR_UINT, ATTR_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_SAVEREGS, "saveregs", BT_FN_PTR_VAR, ATTR_NULL)
-DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_NULL)
+DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_NOTHROW_LEAF_LIST)
DEF_EXT_LIB_BUILTIN (BUILT_IN_STRFMON, "strfmon", BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR, ATTR_FORMAT_STRFMON_NOTHROW_3_4)
DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR, ATTR_FORMAT_STRFTIME_NOTHROW_3_0)
DEF_GCC_BUILTIN (BUILT_IN_TRAP, "trap", BT_FN_VOID, ATTR_NORETURN_NOTHROW_LEAF_LIST)
diff --git a/gcc/calls.c b/gcc/calls.c
index cdab8e04617..0c7f22566bc 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -545,7 +545,7 @@ special_function_p (const_tree fndecl, int flags)
&& ! strcmp (tname, "sigsetjmp"))
|| (tname[1] == 'a'
&& ! strcmp (tname, "savectx")))
- flags |= ECF_RETURNS_TWICE;
+ flags |= ECF_RETURNS_TWICE | ECF_LEAF;
if (tname[1] == 'i'
&& ! strcmp (tname, "siglongjmp"))
@@ -557,7 +557,7 @@ special_function_p (const_tree fndecl, int flags)
&& ! strcmp (tname, "vfork"))
|| (tname[0] == 'g' && tname[1] == 'e'
&& !strcmp (tname, "getcontext")))
- flags |= ECF_RETURNS_TWICE;
+ flags |= ECF_RETURNS_TWICE | ECF_LEAF;
else if (tname[0] == 'l' && tname[1] == 'o'
&& ! strcmp (tname, "longjmp"))
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 83b41b1ef2c..57af7de2c09 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1835,8 +1835,8 @@ update_ssa_across_abnormal_edges (basic_block bb, basic_block ret_bb,
phi = gsi_stmt (si);
- /* There shouldn't be any PHI nodes in the ENTRY_BLOCK. */
- gcc_assert (!e->dest->aux);
+ /* For abnormal goto/call edges the receiver can be the
+ ENTRY_BLOCK. Do not assert this cannot happen. */
gcc_assert ((e->flags & EDGE_EH)
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)));