This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Creating a tree node from gimple statement.
- From: Diego Novillo <dnovillo at google dot com>
- To: Swaroop Joshi <swaroop at cse dot iitb dot ac dot in>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 13 May 2010 16:49:51 -0400
- Subject: Re: Creating a tree node from gimple statement.
- References: <4BEC3B87.6040207@cse.iitb.ac.in>
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.