This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa][RFC] An interface to fold(tree)
- From: law at redhat dot com
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Oct 2003 22:18:02 -0600
- Subject: Re: [tree-ssa][RFC] An interface to fold(tree)
- Reply-to: law at redhat dot com
In message <Pine.LNX.4.44.0310172016120.28314-100000@www.eyesopen.com>, Roger S
ayle writes:
>
>Just to agree with Jeff, I much prefer this approach.
>
>Instead of having a single fold_tree with an arbitrary number of
>arguments, some of which may be NULL_TREE, I'd suggest pushing
>the role model of "simplify_rtx" even further, and have several
>"baby-folds": fold_unary, fold_binary, fold_ternary, etc...
Yea, that's probably better.
>I also like the simplify_rtx model of returning NULL_TREE if no
>simplification can be made. The last line of the pseudo-code
>above then becomes:
>
> temp = fold_tree (code, type, op[0], op[1], op[2], op[3]);
> return temp ? temp : exp;
>
>and we save generating a few more temporary trees.
Yes.
Jeff