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: [patch] Fold ~X ^ ~Y into X ^ Y.


On Tue, 2005-04-19 at 15:30 +0200, Giovanni Bajo wrote:
> James A. Morrison <ja2morri@csclub.uwaterloo.ca> wrote:
> 
> >>>   This patch adds the ~X ^ ~Y to X ^ Y transformation to fold_binary.
> >>> Bootstrapped and regtested on ia64-linux, no new regressions.  Ok for
> >>> mainline?
> >
> >  Is there a better place?  By the time we get to generic fold seems to
> have
> > been called on all of the original trees.
> 
> This is not a requirement. In fact, both the C++ and Java frontends have
> actual *bugs* that happen because of calls to fold() from within the
> frontend proper, and they are both planning of removing all calls to fold.
> 
> I don't know of a better place though... maybe at the end of the tree
> optimizers?
In the short term, checking early is probably OK since we try to fold
everything once before we enter the tree-ssa path.  However, this is
the kind of thing that I'd like to see handled by a tree combiner
in the future.

Jeff


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