aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-02-01 09:40:31 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-02-01 09:40:31 +0100
commit021293cb5abbe2a03c36bb5324ef2ebebcc98c9d (patch)
tree22ced0be1f1d48fca4a1b793689fd1f9bffc18f7 /gcc/profile.c
parentb49e41743c3343f32642a4fbb2dd3c2bc4ccb838 (diff)
downloadgcc-021293cb5abbe2a03c36bb5324ef2ebebcc98c9d.zip
gcc-021293cb5abbe2a03c36bb5324ef2ebebcc98c9d.tar.gz
gcc-021293cb5abbe2a03c36bb5324ef2ebebcc98c9d.tar.bz2
re PR tree-optimization/60003 (wrong code with __builtin_setjmp/__builtin_longjmp and inlining)
PR tree-optimization/60003 * gimple-low.c (lower_builtin_setjmp): Set cfun->has_nonlocal_label. * profile.c (branch_prob): Use gimple_call_builtin_p to check for BUILT_IN_SETJMP_RECEIVER. * tree-inline.c (copy_bb): Call notice_special_calls. * gcc.c-torture/execute/pr60003.c: New test. From-SVN: r207382
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 752d89f..83cbc07 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1104,7 +1104,6 @@ branch_prob (void)
{
gimple_stmt_iterator gsi;
gimple first;
- tree fndecl;
gsi = gsi_start_nondebug_after_labels_bb (bb);
gcc_checking_assert (!gsi_end_p (gsi));
@@ -1114,10 +1113,7 @@ branch_prob (void)
special and don't expect anything to be inserted before
them. */
if (is_gimple_call (first)
- && (((fndecl = gimple_call_fndecl (first)) != NULL
- && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
- && (DECL_FUNCTION_CODE (fndecl)
- == BUILT_IN_SETJMP_RECEIVER))
+ && (gimple_call_builtin_p (first, BUILT_IN_SETJMP_RECEIVER)
|| (gimple_call_flags (first) & ECF_RETURNS_TWICE)
|| (gimple_call_internal_p (first)
&& (gimple_call_internal_fn (first)