Question for getting gimple register for structure?

wang tom via gcc-help gcc-help@gcc.gnu.org
Wed Dec 5 08:58:00 GMT 2018


Hello,
I read code from gimple stmt, and I want to get the register(in tree type) of structure, for example, in my test code:structure A{int *a;}...int main(){A a1;a1.a=malloc( sizeof(int));...}
When the test code turns into gimple, it looks like this:_8 = malloc (4);
a1.a = _8;
_9 = a1.a;

Although I can use gimple_assign_lhs() to get tree a1.a in a1.a = _8,but I cannot get the same tree a1.a in _9 = a1.a by using gimple_assign_rhs1().Is there another do the thing?



More information about the Gcc-help mailing list