This is the mail archive of the gcc-help@gcc.gnu.org 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]

Question about DECL_UID of struct field


Hi,

I am trying to write a pass to do value profiling of struct fields.
For example, given a struct
struct S {
   a;
   b;
}
I would like to profile values of every instance of S.a and S.b.

Currently I use DECL_UID(a) and DELC_UID(b) to represent the two fields.
However, I found out that, for different compilation units (i.e.,
different source files), the DECL_UID are different. Therefore, S.a
and S.b will be treated
differently for different source files.  Is there a way that I can get
a global unique identification of
struct fields?

thanks

Haifeng


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