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][RFC] An interface to fold(tree)


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



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