This is the mail archive of the gcc@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: [tuples] gimple_assign_subcode for GIMPLE_SINGLE_RHS


On Mon, Mar 10, 2008 at 4:12 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Sun, Mar 9, 2008 at 14:22, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> 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.


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