aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-11-29 14:20:00 +0100
committerMartin Liska <marxin@gcc.gnu.org>2016-11-29 13:20:00 +0000
commit248cce34f1003712c39639980d4cb549ef24834a (patch)
treeab8ee93531f114d48e6b1934ff65f2087f1c4c79
parentf4214e239fd52de27a97f402d0b4c01755a549d9 (diff)
downloadgcc-248cce34f1003712c39639980d4cb549ef24834a.zip
gcc-248cce34f1003712c39639980d4cb549ef24834a.tar.gz
gcc-248cce34f1003712c39639980d4cb549ef24834a.tar.bz2
Make one extra BB to prevent PHI argument clash (PR
PR gcov-profile/78582 * gcc.dg/pr78582.c: New test. PR gcov-profile/78582 * tree-profile.c (gimple_gen_time_profiler): Make one extra BB to prevent PHI argument clash. From-SVN: r242958
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/tree-profile.c6
3 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e8b1179..feb30a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-29 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/78582
+ * tree-profile.c (gimple_gen_time_profiler): Make one extra BB
+ to prevent PHI argument clash.
+
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.opt (marclinux): Fix typo.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 101a6e0..62f362a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-29 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/78582
+ * gcc.dg/pr78582.c: New test.
+
2016-11-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* testsuite/gcc.dg/pr31096-1.c: Use __{U,}INT32_TYPE__ for
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index a4f9d11..77fb86e 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -461,10 +461,10 @@ void
gimple_gen_time_profiler (unsigned tag, unsigned base)
{
tree type = get_gcov_type ();
- basic_block cond_bb
- = split_edge (single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
-
+ basic_block entry = ENTRY_BLOCK_PTR_FOR_FN (cfun);
+ basic_block cond_bb = split_edge (single_succ_edge (entry));
basic_block update_bb = split_edge (single_succ_edge (cond_bb));
+ split_edge (single_succ_edge (update_bb));
edge true_edge = single_succ_edge (cond_bb);
true_edge->flags = EDGE_TRUE_VALUE;