This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Markus Trippelsdorf <markus at trippelsdorf dot de>
- Date: Wed, 16 Mar 2016 10:02:33 -0700
- Subject: Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOrx2TKEnBsSzCkB6eB33FjsaFoyKqx68D=jgNzxjhNHng at mail dot gmail dot com> <20160302162538 dot 66068C88E at oc7340732750 dot ibm dot com> <CAMe9rOqF-B-he1JWaxq5++1a75vKtpECRAgcMDd+EbjdxQzLdQ at mail dot gmail dot com> <56E82BC4 dot 7070401 at redhat dot com> <CAMe9rOrryUFdvOW-wkkcSVxCFzeuseFPx9MJVrEe4k-d_iq7-Q at mail dot gmail dot com> <56E8633B dot 8070303 at redhat dot com> <CAMe9rOqDL-mtO5TCXMPMr0Q-YWkk5W=6hryy22HhFXP=eP-few at mail dot gmail dot com> <56E990BE dot 1020104 at redhat dot com>
On Wed, Mar 16, 2016 at 9:58 AM, Jason Merrill <jason@redhat.com> wrote:
> On 03/16/2016 08:38 AM, H.J. Lu wrote:
>>
>> FAIL: g++.dg/abi/pr60336-1.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx9true_type
>> FAIL: g++.dg/abi/pr60336-5.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx9true_type
>> FAIL: g++.dg/abi/pr60336-6.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx9true_type
>> FAIL: g++.dg/abi/pr60336-7.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx9true_type
>> FAIL: g++.dg/abi/pr60336-9.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx9true_type
>> FAIL: g++.dg/abi/pr68355.C scan-assembler jmp[\t
>> ]+[^$]*?_Z3xxx17integral_constantIbLb1EE
>
>
> These pass for me on x86_64, but I do see calls with -m32.
>
>> They are expected since get_ref_base_and_extent needs to be
>> changed to set bitsize to 0 for empty types so that when
>> ref_maybe_used_by_call_p_1 calls get_ref_base_and_extent to
>> get 0 as the maximum size on empty type. Otherwise, find_tail_calls
>> won't perform tail call optimization for functions with empty type
>> parameters.
>
>
> That isn't why the optimization isn't happening in pr68355 with -m32; the
> .optimized dump has
>
> xxx (D.2289); [tail call]
>
> Rather, the failure seems to happen in load_register_parameter, at
>
>> /* Check for overlap with already clobbered argument area,
>> providing that this has non-zero size. */
>> if (is_sibcall
>> && (size == 0
>> || mem_overlaps_already_clobbered_arg_p
>> (XEXP (args[i].value, 0),
>> size)))
>> *sibcall_failure = 1;
>
>
> The code seems to contradict the comment, and seems to have been broken by
> r162402. Applying this additional patch fixes those tests.
>
I am running the full test now.
--
H.J.