public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH]Partially fix PR61529, bound basic block frequency
@ 2014-10-29  9:35 Renlin Li
  2014-10-29 12:55 ` Teresa Johnson
  0 siblings, 1 reply; 12+ messages in thread
From: Renlin Li @ 2014-10-29  9:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: teresa Johnson, ramana Radhakrishnan, su

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Hi all,

This is a simple patch to fix ICE in comment 2 of PR61529: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61529

Bound checking code is added to make sure the frequency is within legal 
range.

As far as I have observed, r215830 patch fixes the glibc building ICE. 
And this patch should fix the ICE while building the sample code in 
comment 2 using aarch64-none-elf toolchain. Until now, all the ICEs 
reported in this bug ticket should be fixed.

x86_64-unknown-linux-gnu bootstrap and regression test have been done, 
no new issue.
aarch64-none-elf toolchain has been test on the model. No new regression.

Is this Okay for trunk?

gcc/ChangeLog:

2014-10-29  Renlin Li  <Renlin.Li@arm.com>
      PR middle-end/61529
     * tree-ssa-threadupdate.c (compute_path_counts): Bound path_in_freq.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-1.diff --]
[-- Type: text/x-patch; name=patch-1.diff, Size: 703 bytes --]

commit c44195cb52ec8ac6386b2b7afe467b680422fb2e
Author: Renlin Li <renlin.li@arm.com>
Date:   Tue Oct 28 16:30:42 2014 +0000

    fix pr61529
    
    Change-Id: Ie5e58510f21a4d7a609306006270c3168ab48d06

diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index d2cf4de..e3077a1 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -730,6 +730,10 @@ compute_path_counts (struct redirection_data *rd,
             nonpath_count += ein->count;
         }
     }
+
+  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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-11-11 21:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-29  9:35 [PATCH]Partially fix PR61529, bound basic block frequency Renlin Li
2014-10-29 12:55 ` Teresa Johnson
2014-11-03 15:29   ` Renlin Li
2014-11-04 21:59     ` Jeff Law
2014-11-06 15:09       ` Renlin Li
2014-11-06 15:38         ` Teresa Johnson
2014-11-06 17:54           ` Renlin Li
2014-11-06 17:59             ` Teresa Johnson
2014-11-06 18:07               ` Renlin Li
2014-11-10 17:00                 ` [PING][PATCH]Partially " Renlin Li
2014-11-10 17:10                   ` Teresa Johnson
2014-11-11 21:43                   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).