Commit 6009ee7b by Martin Jambor Committed by Martin Jambor

cgraph.h (struct cgraph_edge): Reorder fields.

2009-12-01  Martin Jambor  <mjambor@suse.cz>

        * cgraph.h (struct cgraph_edge): Reorder fields.  Make loop_nest
	unsigned short int.
	* ipa-prop.h (struct ipa_param_call_note): Likewise.
	* ipa-prop.c (ipa_note_param_call): Initialize note->loop_nest.

From-SVN: r154872
parent b27dc431
2009-12-01 Martin Jambor <mjambor@suse.cz>
* cgraph.h (struct cgraph_edge): Reorder fields. Make loop_nest
unsigned short int.
* ipa-prop.h (struct ipa_param_call_note): Likewise.
* ipa-prop.c (ipa_note_param_call): Initialize note->loop_nest.
2009-12-01 Richard Guenther <rguenther@suse.de> 2009-12-01 Richard Guenther <rguenther@suse.de>
* final.c (rest_of_clean_state): If -fcompare-debug is * final.c (rest_of_clean_state): If -fcompare-debug is
...@@ -310,6 +310,8 @@ typedef enum { ...@@ -310,6 +310,8 @@ typedef enum {
} cgraph_inline_failed_t; } cgraph_inline_failed_t;
struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgraph_edge { struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgraph_edge {
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
struct cgraph_node *caller; struct cgraph_node *caller;
struct cgraph_node *callee; struct cgraph_node *callee;
struct cgraph_edge *prev_caller; struct cgraph_edge *prev_caller;
...@@ -317,29 +319,27 @@ struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgrap ...@@ -317,29 +319,27 @@ struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgrap
struct cgraph_edge *prev_callee; struct cgraph_edge *prev_callee;
struct cgraph_edge *next_callee; struct cgraph_edge *next_callee;
gimple call_stmt; gimple call_stmt;
/* The stmt_uid of this call stmt. This is used by LTO to recover
the call_stmt when the function is serialized in. */
unsigned int lto_stmt_uid;
PTR GTY ((skip (""))) aux; PTR GTY ((skip (""))) aux;
/* When equal to CIF_OK, inline this call. Otherwise, points to the /* When equal to CIF_OK, inline this call. Otherwise, points to the
explanation why function was not inlined. */ explanation why function was not inlined. */
cgraph_inline_failed_t inline_failed; cgraph_inline_failed_t inline_failed;
/* Expected number of executions: calculated in profile.c. */ /* The stmt_uid of call_stmt. This is used by LTO to recover the call_stmt
gcov_type count; when the function is serialized in. */
unsigned int lto_stmt_uid;
/* Expected frequency of executions within the function. /* Expected frequency of executions within the function.
When set to CGRAPH_FREQ_BASE, the edge is expected to be called once When set to CGRAPH_FREQ_BASE, the edge is expected to be called once
per function call. The range is 0 to CGRAPH_FREQ_MAX. */ per function call. The range is 0 to CGRAPH_FREQ_MAX. */
int frequency; int frequency;
/* Unique id of the edge. */
int uid;
/* Depth of loop nest, 1 means no loop nest. */ /* Depth of loop nest, 1 means no loop nest. */
unsigned int loop_nest : 30; unsigned short int loop_nest;
/* Whether this edge describes a call that was originally indirect. */ /* Whether this edge describes a call that was originally indirect. */
unsigned int indirect_call : 1; unsigned int indirect_call : 1;
/* True if the corresponding CALL stmt cannot be inlined. */ /* True if the corresponding CALL stmt cannot be inlined. */
unsigned int call_stmt_cannot_inline_p : 1; unsigned int call_stmt_cannot_inline_p : 1;
/* Can this call throw externally? */ /* Can this call throw externally? */
unsigned int can_throw_external : 1; unsigned int can_throw_external : 1;
/* Unique id of the edge. */
int uid;
}; };
#define CGRAPH_FREQ_BASE 1000 #define CGRAPH_FREQ_BASE 1000
......
...@@ -754,6 +754,7 @@ ipa_note_param_call (struct ipa_node_params *info, int formal_id, ...@@ -754,6 +754,7 @@ ipa_note_param_call (struct ipa_node_params *info, int formal_id,
note->lto_stmt_uid = gimple_uid (stmt); note->lto_stmt_uid = gimple_uid (stmt);
note->count = bb->count; note->count = bb->count;
note->frequency = compute_call_stmt_bb_frequency (current_function_decl, bb); note->frequency = compute_call_stmt_bb_frequency (current_function_decl, bb);
note->loop_nest = bb->loop_depth;
note->next = info->param_calls; note->next = info->param_calls;
info->param_calls = note; info->param_calls = note;
......
...@@ -139,6 +139,8 @@ struct ipcp_lattice ...@@ -139,6 +139,8 @@ struct ipcp_lattice
are linked in a list. */ are linked in a list. */
struct ipa_param_call_note struct ipa_param_call_note
{ {
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
/* Linked list's next */ /* Linked list's next */
struct ipa_param_call_note *next; struct ipa_param_call_note *next;
/* Statement that contains the call to the parameter above. */ /* Statement that contains the call to the parameter above. */
...@@ -147,13 +149,11 @@ struct ipa_param_call_note ...@@ -147,13 +149,11 @@ struct ipa_param_call_note
unsigned int lto_stmt_uid; unsigned int lto_stmt_uid;
/* Index of the parameter that is called. */ /* Index of the parameter that is called. */
int formal_id; int formal_id;
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
/* Expected frequency of executions within the function. see cgraph_edge in /* Expected frequency of executions within the function. see cgraph_edge in
cgraph.h for more on this. */ cgraph.h for more on this. */
int frequency; int frequency;
/* Depth of loop nest, 1 means no loop nest. */ /* Depth of loop nest, 1 means no loop nest. */
int loop_nest; unsigned short int loop_nest;
/* Set when we have already found the target to be a compile time constant /* Set when we have already found the target to be a compile time constant
and turned this into an edge or when the note was found unusable for some and turned this into an edge or when the note was found unusable for some
reason. */ reason. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment