public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-8-branch)] backport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload)
@ 2020-09-17 16:40 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2020-09-17 16:40 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0929f68dcd58789b7da51eb6ff698439fb84ed9b

commit 0929f68dcd58789b7da51eb6ff698439fb84ed9b
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 14 13:45:52 2020 +0100

    backport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload)
    
            Backported from mainline
            2019-12-14  Jakub Jelinek  <jakub@redhat.com>
    
            PR ipa/92357
            * ipa-fnsummary.c (ipa_fn_summary_write): Use
            lto_symtab_encoder_iterator with lsei_start_function_in_partition and
            lsei_next_function_in_partition instead of walking all cgraph nodes
            in encoder.

Diff:
---
 gcc/ChangeLog       |  6 ++++++
 gcc/ipa-fnsummary.c | 18 +++++++++---------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76fcb48b99c..de7297c7efe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,12 @@
 2020-02-14  Jakub Jelinek  <jakub@redhat.com>
 
 	Backported from mainline
+	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/92930
+	* ipa-pure-const.c (special_builtin_state): Don't handle
+	BUILT_IN_APPLY.
+
 	2019-12-12  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92904
diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index bdf9ba1c921..3b58a5441ab 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -3413,24 +3413,24 @@ static void
 ipa_fn_summary_write (void)
 {
   struct output_block *ob = create_output_block (LTO_section_ipa_fn_summary);
+  lto_symtab_encoder_iterator lsei;
   lto_symtab_encoder_t encoder = ob->decl_state->symtab_node_encoder;
   unsigned int count = 0;
-  int i;
 
-  for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
+  for (lsei = lsei_start_function_in_partition (encoder); !lsei_end_p (lsei);
+       lsei_next_function_in_partition (&lsei))
     {
-      symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
-      cgraph_node *cnode = dyn_cast <cgraph_node *> (snode);
-      if (cnode && cnode->definition && !cnode->alias)
+      cgraph_node *cnode = lsei_cgraph_node (lsei);
+      if (cnode->definition && !cnode->alias)
 	count++;
     }
   streamer_write_uhwi (ob, count);
 
-  for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
+  for (lsei = lsei_start_function_in_partition (encoder); !lsei_end_p (lsei);
+       lsei_next_function_in_partition (&lsei))
     {
-      symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
-      cgraph_node *cnode = dyn_cast <cgraph_node *> (snode);
-      if (cnode && cnode->definition && !cnode->alias)
+      cgraph_node *cnode = lsei_cgraph_node (lsei);
+      if (cnode->definition && !cnode->alias)
 	{
 	  struct ipa_fn_summary *info = ipa_fn_summaries->get (cnode);
 	  struct bitpack_d bp;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-17 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 16:40 [gcc(refs/vendors/redhat/heads/gcc-8-branch)] backport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload) Jakub Jelinek

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).