Extracting operand name and value from GIMPLE assignment statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guys,

I am writing a GCC plugin in which I need to extract the variable name
and the assigned value from the statements.

I am able to get the three operands from GIMPLE statements like this

        if(is_gimple_assign(stmt)) {
                tree lhsop = gimple_assign_lhs(stmt);
                tree rhsop1 = gimple_assign_rhs1(stmt);
                tree rhsop2 = gimple_assign_rhs2(stmt);
         }

I want to get the exact variable name from lhsop and value from rhsop1
(for statements such as
"var = value;", rhsop2 is 0 for such statements.). Some pointers to
example code or documentation would be great. I can't find anything
similar in

http://gcc.gnu.org/onlinedocs/gccint/Manipulating-GIMPLE-statements.html

Thanks a lot !

Regards,
Sandeep K Chaudhary.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux