This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
getting non-global variable names from RTL
- From: Mihai Burcea <burceam at eecg dot toronto dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 20 Feb 2004 19:06:02 -0500 (EST)
- Subject: getting non-global variable names from RTL
Hi,
I am writing a small optimization pass for gcc-3.3.1, and I would need to
be able to identify the arguments that were passed to the current
function on the stack with their counterparts from the source code (i.e.,
in RTL, I would have those variables in virtual-incoming-args +0, +4, +8,
etc, and I can see what registers they are extracted into; but what I
would like to know is that this function was called like f (a, b, c), so I
know that virtual-incoming-args + 8 is "a", virtual-incoming-args + 4 is
"b", and virtual-incoming-args + 0 is "c").
My problem is that in my pass I have the variable names, and I need to
pair them with the ones passed to the function through the stack.
If there is a data structure that still retains the names of the variables
(from the source code), I wasn't able to find it.
I am aware that if one knew the exact order in which the variables were
passed to the function by their name, then of course one would be able to
identify them. But I am not sure yet that I can get that kind of
information (accurately).
Thank you in advance for any help.
mihai