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: [lto] PATCH: new CALL_EXPR constructors



! 	      if (newop != op)
  		{
! 		  copy = copy_node (exp);
! 		  TREE_OPERAND (copy, i) = newop;
  		}

This should be:


if (newop != op)
  {
    if (!copy)
      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,
	
Paolo


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