On Mon, Mar 10, 2008 at 4:12 PM, Diego Novillo <[EMAIL PROTECTED]> wrote: > On Sun, Mar 9, 2008 at 14:22, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > > > extract_ops_from_tree would return GIMPLE_COPY as subcode and > > the whole expression as op1, where's the problem? > > Sorry, I misunderstood you. I thought you were advocating *against* > GIMPLE_COPY. > > > > > I need to introduce GIMPLE_TERNARY_RHS (for ASSERT_EXPR) and > > > GIMPLE_QUATERNARY_RHS (for COND_EXPR), > > > > How are you going to represent the COND_EXPRs (i.e., where are you > > going to put their comparison operator)? > > Well, until 10 seconds ago, I was going to represent 'a = (b > c) ? x : y' > with > > GIMPLE_ASSIGN <GT_EXPR, b, c, x, y> > > *but* that could be confused with 'a = (b > c)', so I have to think > more about it.
You could either do GIMPLE_ASSIGN <COND_EXPR, cond, x, y> or invent COND_GT_EXPR, COND_GE_EXPR, etc. (at least in GIMPLE we always have a comparison in COND_EXPR_COND, never a plain boolean variable). Richard.