This is the mail archive of the gcc-patches@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: [tree-ssa] COND_EXPR lowering


On Wed, 2003-10-08 at 13:02, Andrew MacLeod wrote:

> Now the that COND_EXPR has a goto on each arm, are we deciding to treat
> the arms *not* as stmt's at all?  ie, It appears to me that we never set
> the basic block nor the parent of the GOTO's on each arm. Im not sure
> that this is a good thing. What do others think?
>
In principle, I don't see a huge problem in treating it as an
indivisible unit.  This means, though that all three expressions *must*
be assigned to the the same basic block (the COND_EXPR and both
GOTO_EXPRs).

If needed, we could provide wrapper functions to access COND_EXPRs.  The
obvious advantage of treating the 3 expressions as a single statement is
the reduction in basic block.

However, what happens if we want to remove one of the branches?  We'll
need to do something special for COND_EXPR when we remove the label.  It
won't "just happen" because the GOTO_EXPRs aren't regular statements
anymore.

Having this kind of magic has given us trouble before (hiding
BIND_EXPRs, for instance).  So, I'm not sure I like the idea.  I guess
we could try it out and see.


Diego.


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