This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IPA merge 6: variable annotations

Jan Hubicka wrote on 12/03/06 18:54:

How would sound putting dense UIDs to each referenced var into the
annotations implemented by direct pointers/hashtable as I am doing now
and using on-side arrays/bitmaps in the passes? (pretty much as we do
for REGNOs on RTL land).

Yes, I have wanted to try this for the longest time.  A dense DECL_UID
space would allow us to use simple arrays like we do with SSA_NAMEs.

I remember disucssing the variable UIDs with Kenny and others on GCC
summit and we was considering some strategies for static numbering (ie
giving global UIDs in a way so each function has just limited range),
but I think we found out this is not going to work in all cases when we
want to invent new local and global variables on the go.  So it seem to
me the hashtable assinging static's the local UIDs is probably best
solution here for local passes, we still can use DECL_UID for purposes
of IPA datastructures.

How about an UID that is a tuple <fnid, declid> so that each
function can add temporary variables?  The tuple could be encoded as a
HOST_WIDE_INT split into M bits for fnid and N bits for declid, or it
could be a structure of two ints.

Each pass would then have a matrix where to store DECL annotations.

+ + /* Hashtable of variables annotations. Used for static variables only;
+ local variables have direct pointer in the tree node. */
+ static inline htab_t
+ gimple_var_anns (struct function *fun)

Spacing. Document argument FUN. Similarly in other functions.

This is OK in the meantime.  I think an array of annotations and
dual ID numbering should work in the long term.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]