Re: Creating a tree node from gimple statement.

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

 



Thanks, Diego.

For the conditional expr, I figured out this one way:
expr = build2 (code, make_node (COND_EXPR), gimple_cond_lhs (stmt), gimple_cond_rhs (stmt));

Any better way ?

Thanks,
Swaroop.


Diego Novillo wrote:
On 5/13/10 13:48 , Swaroop Joshi wrote:
Hi,

I am using gcc-4.5.0.
Given a gimple statement: a = b + c;
I want a tree node for the rhs (b+c).
Using gimple_assign_rhs1(stmt), etc., I can get (b), (c) as separate
tree nodes.
Can I make a tree node from these ?

Yes, you can.  You need to call build2(gimple_assign_rhs1(stmt), <b>, <c>).

Diego.

[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