This is the mail archive of the
mailing list for the GCC project.
Re: [lto] PATCH: new CALL_EXPR constructors
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Sandra Loosemore <sandra at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 05 Aug 2006 19:30:28 +0200
- Subject: Re: [lto] PATCH: new CALL_EXPR constructors
- References: <44D4C934.firstname.lastname@example.org>
! if (newop != op)
! copy = copy_node (exp);
! TREE_OPERAND (copy, i) = newop;
This should be:
if (newop != op)
copy = copy_node (exp);
TREE_OPERAND (copy, i) = newop;
* gcc/builtins.c (fold_builtin_call_list): Replacement for
fold_build_call_expr. Renamed for consistency with other new
CALL_EXPR constructors, and removed the static_chain argument since
it is never used. Fixed all callers.
Please leave in the static_chain argument, one step at a time.
+ /* We can't use allocation pools to hold temporary CALL_EXPR objects, since
+ they are not of fixed size. Instead, we'll xmalloc them directly, and
+ chain them together through their TREE_CHAIN slots. We don't need to
+ free them individually, just the whole chain of them when we are done. */
It's better not to introduce new TREE_CHAIN usages. You may put a FIXME
comment saying that we may want to remove it. Or you may use an obstack
instead of malloc, because it is easy to free it all in a single call.
I read the patch only up to tree-ssa-pre.c.
Hope this helps,