diff mbox

[PR,48613] Don't stream jump functions if there are none

Message ID 20110614205103.GB30874@virgil.arch.suse.de
State New
Headers show

Commit Message

Martin Jambor June 14, 2011, 8:51 p.m. UTC
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.

Comments

Jan Hubicka June 14, 2011, 10:38 p.m. UTC | #1
> 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
diff mbox

Patch

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