This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] field names
- From: "Dennis Dams" <dennis at research dot bell-labs dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 1 Jul 2003 18:02:27 -0400
- Subject: [tree-ssa] field names
This is a question related to the GIMPLE format.
In gimplifying, expressions that take the addres of a structure field are
turned into an offset expression.
The name of the field seems to get lost in this. E.g. when the following
program is gimplified
int main(void)
{ struct {
int m;
int n;
} s;
int *p = &s.n;
}
then the assignment becomes something like
p = s + 4
At least that is what is shown in the .t00.tu and .t03.generic files
produced by -fdump-tree-all.
Is there a simple way (without essentially reversing the offset calculation)
to recover the info that
the n field was selected?
In "closer-to-the-source" analyses that GIMPLE is supposed to enable, such
info may not be
discarded, I would think. The offset 4 is platform dependent and seems out
of place in an
intermediate language at the level of GIMPLE.
--dennis (pls. cc replies to dennis@research.bell-labs.com)