public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, PR 48613] Don't stream jump functions if there are none
@ 2011-06-14 20:53 Martin Jambor
  2011-06-14 22:46 ` Jan Hubicka
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jambor @ 2011-06-14 20:53 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jan Hubicka

Hi,

the patch below fixes PR 48613 which is an ICE with -O0
-findirect-inlining.  Rather than adding "&& optimize" here and there,
at this place we can easily see whether there is something to do or
not by testing ipa_node_params_vector for NULL.  And the
flag-triggering combinations can -and are - dealt elsewhere.

Bootstrapped and tested on trunk on x86_64-linux.  OK for trunk and
subsequently for the 4.6 branch too?

Thanks,

Martin

2011-06-13  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/48613
	* ipa-prop.c (ipa_prop_write_jump_functions): Return immediately if
	ipa_node_params_vector is NULL.

Index: src/gcc/ipa-prop.c
===================================================================
--- src.orig/gcc/ipa-prop.c
+++ src/gcc/ipa-prop.c
@@ -2900,12 +2900,15 @@ void
 ipa_prop_write_jump_functions (cgraph_node_set set)
 {
   struct cgraph_node *node;
-  struct output_block *ob = create_output_block (LTO_section_jump_functions);
+  struct output_block *ob;
   unsigned int count = 0;
   cgraph_node_set_iterator csi;
 
-  ob->cgraph_node = NULL;
+  if (!ipa_node_params_vector)
+    return;
 
+  ob = create_output_block (LTO_section_jump_functions);
+  ob->cgraph_node = NULL;
   for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi))
     {
       node = csi_node (csi);

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

* Re: [PATCH, PR 48613] Don't stream jump functions if there are none
  2011-06-14 20:53 [PATCH, PR 48613] Don't stream jump functions if there are none Martin Jambor
@ 2011-06-14 22:46 ` Jan Hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Hubicka @ 2011-06-14 22:46 UTC (permalink / raw)
  To: GCC Patches, Jan Hubicka

> Hi,
> 
> the patch below fixes PR 48613 which is an ICE with -O0
> -findirect-inlining.  Rather than adding "&& optimize" here and there,
> at this place we can easily see whether there is something to do or
> not by testing ipa_node_params_vector for NULL.  And the
> flag-triggering combinations can -and are - dealt elsewhere.
> 
> Bootstrapped and tested on trunk on x86_64-linux.  OK for trunk and
> subsequently for the 4.6 branch too?
> 
> Thanks,
> 
> Martin
> 
> 2011-06-13  Martin Jambor  <mjambor@suse.cz>
> 
> 	PR tree-optimization/48613
> 	* ipa-prop.c (ipa_prop_write_jump_functions): Return immediately if
> 	ipa_node_params_vector is NULL.
OK,
thanks!
Honza

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

end of thread, other threads:[~2011-06-14 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14 20:53 [PATCH, PR 48613] Don't stream jump functions if there are none Martin Jambor
2011-06-14 22:46 ` Jan Hubicka

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