aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-22 11:16:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-22 11:16:32 +0000
commitbee0b10c535d7a4d6fd3221062b07ace1d6b1e98 (patch)
treef62cf8d700d68c144805131381be150a5f11084b /gcc
parentbf7a73f980176707745367de9e384034e1fa32c0 (diff)
downloadgcc-bee0b10c535d7a4d6fd3221062b07ace1d6b1e98.zip
gcc-bee0b10c535d7a4d6fd3221062b07ace1d6b1e98.tar.gz
gcc-bee0b10c535d7a4d6fd3221062b07ace1d6b1e98.tar.bz2
re PR tree-optimization/57349 (ICE on 253.perlbmk with pgo after r198096)
2013-05-22 Richard Biener <rguenther@suse.de> PR middle-end/57349 * profile.c (branch_prob): Do not split blocks that are abnormally receiving from ECF_RETURNS_TWICE functions. From-SVN: r199193
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/profile.c26
2 files changed, 20 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 16cd2d9..ffb3c67 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-22 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57349
+ * profile.c (branch_prob): Do not split blocks that are
+ abnormally receiving from ECF_RETURNS_TWICE functions.
+
2013-05-22 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
* recog.c (offsettable_address_addr_space_p): Fix calculation of
diff --git a/gcc/profile.c b/gcc/profile.c
index 6f05581..b833398 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1085,18 +1085,20 @@ branch_prob (void)
or __builtin_setjmp_dispatcher calls. These are very
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
- && (DECL_FUNCTION_CODE (fndecl)
- != BUILT_IN_SETJMP_DISPATCHER)))
- {
- if (dump_file)
- fprintf (dump_file, "Splitting bb %i after labels\n",
- bb->index);
- split_block_after_labels (bb);
- }
+ 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
+ || (DECL_FUNCTION_CODE (fndecl)
+ == BUILT_IN_SETJMP_DISPATCHER)))
+ || gimple_call_flags (first) & ECF_RETURNS_TWICE))
+ continue;
+
+ if (dump_file)
+ fprintf (dump_file, "Splitting bb %i after labels\n",
+ bb->index);
+ split_block_after_labels (bb);
}
}
}