aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2014-11-10 17:53:21 +0000
committerJiong Wang <jiwang@gcc.gnu.org>2014-11-10 17:53:21 +0000
commit202d59415f19e3bb8a85abca3f79d952f8a4d54c (patch)
treee13c3ceaa56a47f629109a9a6d9f8fcd7fa67357 /gcc/tree-ssa-threadupdate.c
parenta25efea0868cef17064a71d76a2fd7d209adc6b3 (diff)
downloadgcc-202d59415f19e3bb8a85abca3f79d952f8a4d54c.zip
gcc-202d59415f19e3bb8a85abca3f79d952f8a4d54c.tar.gz
gcc-202d59415f19e3bb8a85abca3f79d952f8a4d54c.tar.bz2
[PATCH] Partially fix PR61529, bound basic block frequency
2014-11-10 Renlin Li <Renlin.Li@arm.com> PR middle-end/61529 gcc/ * tree-ssa-threadupdate.c (compute_path_counts): Bound path_in_freq. gcc/testsuite/ * gcc.dg/pr61529.c: New. From-SVN: r217303
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 5d838c3..151ed83 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -734,6 +734,11 @@ compute_path_counts (struct redirection_data *rd,
nonpath_count += ein->count;
}
}
+
+ /* This is needed due to insane incoming frequencies. */
+ if (path_in_freq > BB_FREQ_MAX)
+ path_in_freq = BB_FREQ_MAX;
+
BITMAP_FREE (in_edge_srcs);
/* Now compute the fraction of the total count coming into the first