Re: [PATCH] Fix ICE during ipa dumping (PR ipa/64730)

2015-01-27 Thread Richard Biener
On Mon, 26 Jan 2015, Jakub Jelinek wrote:

> Hi!
> 
> On various targets, %s in fprintf can't handle NULL arguments,
> and even when edge->call_stmt is non-NULL, it still might have
> UNKNOWN_LOCATION or BUILTINS_LOCATION, which have NULL filename.
> In this particular case it is a fnsplit created call.
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?

Ok.

Thanks,
Richard.

> 2015-01-26  Jakub Jelinek  
> 
>   PR ipa/64730
>   * ipa-inline.c (inline_small_functions): Print "unknown" even
>   if edge->call_stmt is non-NULL, but has builtins or unknown
>   location.
> 
> --- gcc/ipa-inline.c.jj   2015-01-22 21:45:18.0 +0100
> +++ gcc/ipa-inline.c  2015-01-26 15:41:57.193640527 +0100
> @@ -1822,6 +1822,9 @@ inline_small_functions (void)
>  " Estimated badness is %f, frequency %.2f.\n",
>  edge->caller->name (), edge->caller->order,
>  edge->call_stmt
> +&& (LOCATION_LOCUS (gimple_location ((const_gimple)
> + edge->call_stmt))
> +> BUILTINS_LOCATION)
>  ? gimple_filename ((const_gimple) edge->call_stmt)
>  : "unknown",
>  edge->call_stmt
> 
>   Jakub
> 
> 

-- 
Richard Biener 
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)


Re: [PATCH] Fix ICE during ipa dumping (PR ipa/64730)

2015-01-26 Thread Jan Hubicka
> Hi!
> 
> On various targets, %s in fprintf can't handle NULL arguments,
> and even when edge->call_stmt is non-NULL, it still might have
> UNKNOWN_LOCATION or BUILTINS_LOCATION, which have NULL filename.
> In this particular case it is a fnsplit created call.
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
> 
> 2015-01-26  Jakub Jelinek  
> 
>   PR ipa/64730
>   * ipa-inline.c (inline_small_functions): Print "unknown" even
>   if edge->call_stmt is non-NULL, but has builtins or unknown
>   location.

OK, thanks
That file/line debug output seems to have caused quite an interesting
set of issues.  Wonder if it was good idea to add it at first time :)

Honza
> 
> --- gcc/ipa-inline.c.jj   2015-01-22 21:45:18.0 +0100
> +++ gcc/ipa-inline.c  2015-01-26 15:41:57.193640527 +0100
> @@ -1822,6 +1822,9 @@ inline_small_functions (void)
>  " Estimated badness is %f, frequency %.2f.\n",
>  edge->caller->name (), edge->caller->order,
>  edge->call_stmt
> +&& (LOCATION_LOCUS (gimple_location ((const_gimple)
> + edge->call_stmt))
> +> BUILTINS_LOCATION)
>  ? gimple_filename ((const_gimple) edge->call_stmt)
>  : "unknown",
>  edge->call_stmt
> 
>   Jakub


[PATCH] Fix ICE during ipa dumping (PR ipa/64730)

2015-01-26 Thread Jakub Jelinek
Hi!

On various targets, %s in fprintf can't handle NULL arguments,
and even when edge->call_stmt is non-NULL, it still might have
UNKNOWN_LOCATION or BUILTINS_LOCATION, which have NULL filename.
In this particular case it is a fnsplit created call.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?

2015-01-26  Jakub Jelinek  

PR ipa/64730
* ipa-inline.c (inline_small_functions): Print "unknown" even
if edge->call_stmt is non-NULL, but has builtins or unknown
location.

--- gcc/ipa-inline.c.jj 2015-01-22 21:45:18.0 +0100
+++ gcc/ipa-inline.c2015-01-26 15:41:57.193640527 +0100
@@ -1822,6 +1822,9 @@ inline_small_functions (void)
   " Estimated badness is %f, frequency %.2f.\n",
   edge->caller->name (), edge->caller->order,
   edge->call_stmt
+  && (LOCATION_LOCUS (gimple_location ((const_gimple)
+   edge->call_stmt))
+  > BUILTINS_LOCATION)
   ? gimple_filename ((const_gimple) edge->call_stmt)
   : "unknown",
   edge->call_stmt

Jakub