diff mbox

Fix part of PR58712

Message ID 20131021073309.GA285@x4
State New
Headers show

Commit Message

Markus Trippelsdorf Oct. 21, 2013, 7:33 a.m. UTC
LTO bootstrapped and tested on x86_64-unknown-linux-gnu.

I would be grateful if one of you guys could apply it.
Thanks.

2013-10-21  Markus Trippelsdorf  <markus@trippelsdorf.de>
	
	PR ipa/58712
	* cgraph.c (cgraph_create_edge_1): Add indirect_unknown_callee
	as argument.
	(cgraph_create_edge): Use the new argument.
	(cgraph_create_indirect_edge): Likewise.

Comments

Markus Trippelsdorf Oct. 24, 2013, 10:50 a.m. UTC | #1
On 2013.10.21 at 09:33 +0200, Markus Trippelsdorf wrote:

Ping.
I do not have write access...

> 
> LTO bootstrapped and tested on x86_64-unknown-linux-gnu.
> 
> I would be grateful if one of you guys could apply it.
> Thanks.
> 
> 2013-10-21  Markus Trippelsdorf  <markus@trippelsdorf.de>
> 	
> 	PR ipa/58712
> 	* cgraph.c (cgraph_create_edge_1): Add indirect_unknown_callee
> 	as argument.
> 	(cgraph_create_edge): Use the new argument.
> 	(cgraph_create_indirect_edge): Likewise.
> 
> 
> diff --git a/gcc/cgraph.c b/gcc/cgraph.c
> index 6ebd0c71e026..7f83a016dcf3 100644
> --- a/gcc/cgraph.c
> +++ b/gcc/cgraph.c
> @@ -814,7 +814,8 @@ cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt,
>  
>  static struct cgraph_edge *
>  cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
> -		       gimple call_stmt, gcov_type count, int freq)
> +		       gimple call_stmt, gcov_type count, int freq,
> +		       bool indir_unknown_callee)
>  {
>    struct cgraph_edge *edge;
>  
> @@ -874,6 +875,7 @@ cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
>    edge->indirect_info = NULL;
>    edge->indirect_inlining_edge = 0;
>    edge->speculative = false;
> +  edge->indirect_unknown_callee = indir_unknown_callee;
>    if (call_stmt && caller->call_site_hash)
>      cgraph_add_edge_to_call_site_hash (edge);
>  
> @@ -887,9 +889,8 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
>  		    gimple call_stmt, gcov_type count, int freq)
>  {
>    struct cgraph_edge *edge = cgraph_create_edge_1 (caller, callee, call_stmt,
> -						   count, freq);
> +						   count, freq, false);
>  
> -  edge->indirect_unknown_callee = 0;
>    initialize_inline_failed (edge);
>  
>    edge->next_caller = callee->callers;
> @@ -926,10 +927,9 @@ cgraph_create_indirect_edge (struct cgraph_node *caller, gimple call_stmt,
>  			     gcov_type count, int freq)
>  {
>    struct cgraph_edge *edge = cgraph_create_edge_1 (caller, NULL, call_stmt,
> -						   count, freq);
> +						   count, freq, true);
>    tree target;
>  
> -  edge->indirect_unknown_callee = 1;
>    initialize_inline_failed (edge);
>  
>    edge->indirect_info = cgraph_allocate_init_indirect_info ();
> 
> -- 
> Markus
>
Jeff Law Oct. 24, 2013, 5:28 p.m. UTC | #2
On 10/24/13 04:50, Markus Trippelsdorf wrote:
> On 2013.10.21 at 09:33 +0200, Markus Trippelsdorf wrote:
>
> Ping.
> I do not have write access...
>
>>
>> LTO bootstrapped and tested on x86_64-unknown-linux-gnu.
>>
>> I would be grateful if one of you guys could apply it.
>> Thanks.
>>
>> 2013-10-21  Markus Trippelsdorf  <markus@trippelsdorf.de>
>> 	
>> 	PR ipa/58712
>> 	* cgraph.c (cgraph_create_edge_1): Add indirect_unknown_callee
>> 	as argument.
>> 	(cgraph_create_edge): Use the new argument.
>> 	(cgraph_create_indirect_edge): Likewise.
Installed on your behalf.

Thanks,
Jeff
diff mbox

Patch

diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 6ebd0c71e026..7f83a016dcf3 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -814,7 +814,8 @@  cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt,
 
 static struct cgraph_edge *
 cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
-		       gimple call_stmt, gcov_type count, int freq)
+		       gimple call_stmt, gcov_type count, int freq,
+		       bool indir_unknown_callee)
 {
   struct cgraph_edge *edge;
 
@@ -874,6 +875,7 @@  cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
   edge->indirect_info = NULL;
   edge->indirect_inlining_edge = 0;
   edge->speculative = false;
+  edge->indirect_unknown_callee = indir_unknown_callee;
   if (call_stmt && caller->call_site_hash)
     cgraph_add_edge_to_call_site_hash (edge);
 
@@ -887,9 +889,8 @@  cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
 		    gimple call_stmt, gcov_type count, int freq)
 {
   struct cgraph_edge *edge = cgraph_create_edge_1 (caller, callee, call_stmt,
-						   count, freq);
+						   count, freq, false);
 
-  edge->indirect_unknown_callee = 0;
   initialize_inline_failed (edge);
 
   edge->next_caller = callee->callers;
@@ -926,10 +927,9 @@  cgraph_create_indirect_edge (struct cgraph_node *caller, gimple call_stmt,
 			     gcov_type count, int freq)
 {
   struct cgraph_edge *edge = cgraph_create_edge_1 (caller, NULL, call_stmt,
-						   count, freq);
+						   count, freq, true);
   tree target;
 
-  edge->indirect_unknown_callee = 1;
   initialize_inline_failed (edge);
 
   edge->indirect_info = cgraph_allocate_init_indirect_info ();