Getting local variable from an artificial variable
Ian Lance Taylor
iant@google.com
Wed Jun 16 16:40:00 GMT 2010
Swaroop Joshi <swaroop@cse.iitb.ac.in> writes:
> C code:
> ...
> p = &r;
> *q = r;
> ...
>
> produces GIMPLE:
> ...
> p = &r;
> r.0 = r;
> *q = r.0;
> ...
>
> Now I want to extract tree r from r.0.
> How can I do this ?
If you are in SSA form, which is true of most of the GIMPLE passes,
then once you have the variable you can call SSA_NAME_DEF_STMT to find
the statement which sets the variable.
Ian
More information about the Gcc-help
mailing list