On Sun, Mar 9, 2008 at 1:29 AM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I just noticed an error in a part of the code that I converted, that
>  looks this way:
>
>  switch (gimple_assign_subcode (stmt))
>  {
>   case SSA_NAME:
>     handle_ssa_name ();
>     break;
>
>   case PLUS_EXPR:
>     handle_plus ();
>     break;
>
>   default:
>     something ();
>  }
>
>  The problem of course is that for GIMPLE_SINGLE_RHS, we do not maintain
>  the invariant that
>
>  gimple_assign_subcode (stmt) == TREE_CODE (gimple_assign_rhs1 (stmt)),
>
>  so gimple_assign_subcode typically will not be SSA_NAME, but VAR_DECL.
>  Enforcing this invariant might be hard and probably asking for more
>  trouble than it is worth.  However, perhaps it would make sense
>  to use some special tree code to indicate GIMPLE_SINGLE_RHS, in order
>  to avoid confusion?

What is GIMPLE_SINGLE_RHS after all?

Thanks,
Richard.

Reply via email to