This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR63422 to handle profile insanities
- From: Teresa Johnson <tejohnson at google dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>
- Cc: David Li <davidxl at google dot com>, joost dot vandevondele at mat dot ethz dot ch, Markus Trippelsdorf <markus at trippelsdorf dot de>
- Date: Wed, 1 Oct 2014 09:59:20 -0700
- Subject: [PATCH] Fix PR63422 to handle profile insanities
- Authentication-results: sourceware.org; auth=none
This patch removes some asserts my jump threading patch r215739 added.
An upstream pass (copyrename2) is introducing some bogus profile
counts, so we can't assert that counts are 0 when there is no profile
data for the function.
Tested on testcase attached to PR63422. Currently running gcc
regression tests for x86_64-unknown-linux-gnu. Ok for trunk if that
passes?
Thanks,
Teresa
2014-10-01 Teresa Johnson <tejohnson@google.com>
PR middle-end/63422
* tree-ssa-threadupdate.c (freqs_to_counts_path): Remove
asserts to handle incoming insanities.
Index: tree-ssa-threadupdate.c
===================================================================
--- tree-ssa-threadupdate.c (revision 215739)
+++ tree-ssa-threadupdate.c (working copy)
@@ -977,20 +977,14 @@ freqs_to_counts_path (struct redirection_data *rd)
edge ein;
edge_iterator ei;
FOR_EACH_EDGE (ein, ei, e->dest->preds)
- {
- gcc_assert (!ein->count);
- ein->count = EDGE_FREQUENCY (ein);
- }
+ ein->count = EDGE_FREQUENCY (ein);
for (unsigned int i = 1; i < path->length (); i++)
{
edge epath = (*path)[i]->e;
- gcc_assert (!epath->count);
edge esucc;
FOR_EACH_EDGE (esucc, ei, epath->src->succs)
- {
- esucc->count = EDGE_FREQUENCY (esucc);
- }
+ esucc->count = EDGE_FREQUENCY (esucc);
epath->src->count = epath->src->frequency;
}
}
--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413