[PATCH] Reorder fields in struct cgraph_edge et al
Martin Jambor
mjambor@suse.cz
Tue Dec 1 10:57:00 GMT 2009
Hi,
On Tue, Dec 01, 2009 at 10:46:33AM +0100, Richard Guenther wrote:
> On Mon, 30 Nov 2009, Martin Jambor wrote:
>
...
> > 2009-11-30 Martin Jambor <mjambor@suse.cz>
> >
> > * cgraph.h (GTY): Reorder fields. Make loop_nest unsigned short int.
> > * ipa-prop.h (struct ipa_param_call_note): Likewise.
> > * ipa-prop.c (ipa_note_param_call): Set note->loop_nest.
> >
> > Index: icln/gcc/cgraph.h
> > ===================================================================
> > --- icln.orig/gcc/cgraph.h
> > +++ icln/gcc/cgraph.h
> > @@ -310,6 +310,8 @@ typedef enum {
> > } cgraph_inline_failed_t;
> >
> > 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;
>
> you now have introduced 32bit padding here ...
>
...
>
> moving this is ok, please leave count where it is
>
...
> > + /* Expected number of executions: calculated in profile.c. */
> > + gcov_type count;
>
> Likewise. gcov_type is 32bit.
>
No, even on i386 gcov_type is 64 bit. I have just double checked.
I have committed the patch as it was per Honza's approval.
Martin
> Ok with that chagnes.
>
> Richard.
>
> > /* Linked list's next */
> > struct ipa_param_call_note *next;
> > /* Statement that contains the call to the parameter above. */
> > @@ -147,13 +149,11 @@ struct ipa_param_call_note
> > unsigned int lto_stmt_uid;
> > /* Index of the parameter that is called. */
> > 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
> > cgraph.h for more on this. */
> > int frequency;
> > /* 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
> > and turned this into an edge or when the note was found unusable for some
> > reason. */
> >
> >
More information about the Gcc-patches
mailing list