This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77445] [7 Regression] Performance drop after r239219 on coremark test
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jan 2017 01:48:28 +0000
- Subject: [Bug tree-optimization/77445] [7 Regression] Performance drop after r239219 on coremark test
- Auto-submitted: auto-generated
- References: <bug-77445-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77445
--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 40526
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40526&action=edit
Patch I am testing
The profile is quite inconsistent since thread1.
The problem is that duplicate_thread_path does
if (total_count)
{
scale_bbs_frequencies_gcov_type (region, n_region,
total_count - entry_count,
total_count);
scale_bbs_frequencies_gcov_type (region_copy, n_region, entry_count,
total_count);
}
else
{
scale_bbs_frequencies_int (region, n_region, total_freq - entry_freq,
total_freq);
scale_bbs_frequencies_int (region_copy, n_region, entry_freq,
total_freq);
}
This is wrong when the duplicated path have extra entries that are not
duplicated which happens in the testcase.
The attached patch fixes it. It is still not 100% correct as the outgoing
probabilities of the original path should be updated based on the path being
copied out, but I am not sure it is worth the trouble (and risk of roundoff
errors). I will think a bit more about this tomorrow.