This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating a tree node from gimple statement.


On 5/13/10 16:53 , Swaroop Joshi wrote:
> 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 ?

No, that should be sufficient.  I suppose that you are doing this for
reasons other than code generation?  These trees that you are creating
are GENERIC and cannot be substituted into GIMPLE.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]