This is the mail archive of the 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: Jason's calls.c patch and spec2000 performance regression

>>>>> "Jan" == Jan Hubicka <> writes:

> I am just looking at the purpose of spec2000 performance regression,
> one of possible purposes is your patch:

> + 2001-12-18  Jason Merrill  <>
> +
> + 	C++ ABI change: destroy value arguments in caller.
> + 	* calls.c (initialize_argument_information): Pass the address of
> + 	the TARGET_EXPR temporary rather than storing it into another.

> I am not sure what performance indications it do have, as I don't understand
> fully the issue, but it looks wrong anyway:

> + 	  else if (TREE_CODE (args[i].tree_value) == TARGET_EXPR)
> + 	    {
> + 	      /* In the V3 C++ ABI, parameters are destroyed in the caller.
> + 		 We implement this by passing the address of the temporary
> + 	         rather than expanding it into another allocated slot.  */
> + 	      args[i].tree_value = build1 (ADDR_EXPR,
> + 					   build_pointer_type (type),
> + 					   args[i].tree_value);
> + 	      type = build_pointer_type (type);
> + 	    }

> Should not this remove the ECF_CONST/ECF_PURE/ECF_LIBCALL_BLOCK as the
> function is allowed (and will) modify it's argument?

Probably, though I can't imagine it making a difference in real code; no
function for which this code applies should have any such attributes.  The
only effect of my change should be to destroy value arguments of a class
type with a destructor in the caller, rather than the callee.


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