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] PATCH to gimplify_boolean_expr


On Mon, 2003-08-25 at 15:36, Jason Merrill wrote:
> On Mon, 25 Aug 2003 15:15:04 -0400, Daniel Berlin <dberlin@dberlin.org> wrote:
> 
> > If you do this, it means we won't hoist the comparison out loops, because
> > we don't hoist control statements (cause it's much trickier in our current
> > representation)
> 
> I've been playing with just requiring a val for if conditions in order to
> avoid redundancy, but that breaks a lot of RTL optimizations.  When we're
> ready, it's a simple matter of changing "is_gimple_condexpr" to
> "is_gimple_val" in gimplify_cond_expr; feel free to try it out.

out of curiosity, why doesnt' it work?

if (x)
   { }
else
   { }
works, so why can't we turn something like

if (z && y)

into

tmp = (z && y);
tmp2 = tmp;
if (tmp2)

and still have it work?  I could have written the program that way in
the first place....

Is this one of the weird FE things? :-)

Andrew



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