This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Jason's calls.c patch and spec2000 performance regression
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 02 Jan 2002 14:04:35 +0000
- Subject: Re: Jason's calls.c patch and spec2000 performance regression
- References: <20020102142603.A17113@atrey.karlin.mff.cuni.cz>
>>>>> "Jan" == Jan Hubicka <jh@suse.cz> writes:
> I am just looking at the purpose of spec2000 performance regression,
> one of possible purposes is your patch:
> + 2001-12-18 Jason Merrill <jason@redhat.com>
> +
> + 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.
Jason