This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR80032 - handle CLOBBER gimplification differently
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Mar 2017 18:43:06 +0100
- Subject: Re: [PATCH] Fix PR80032 - handle CLOBBER gimplification differently
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8F957C054C5E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8F957C054C5E
- References: <alpine.LSU.2.20.1703171356130.30051@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Mar 17, 2017 at 02:42:27PM +0100, Richard Biener wrote:
> 2017-03-17 Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/80032
> * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
> if set force the cleanup to happen unconditionally.
> (gimplify_target_expr): Push inserted clobbers with force_uncond
> to avoid them being removed by control-dependent DCE.
>
> * g++.dg/opt/pr80032.C: New testcase.
>
> ! if (gimple_conditional_context ()
> ! && ! force_uncond)
This ought to fit on one line.
Otherwise it looks good to me. Does the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80032#c8
regression happen with this patch or the earlier version of the patch?
> --- gcc/testsuite/g++.dg/opt/pr80032.C (nonexistent)
> +++ gcc/testsuite/g++.dg/opt/pr80032.C (working copy)
> @@ -0,0 +1,121 @@
> +// PR tree-optimization/80032
> +/* { dg-do compile } */
> +/* { dg-require-effective-target c++11 } */
> +/* { dg-options "-O2" } */
It is weird to mix // and /* */ comments, better just pick one style.
Also, // { dg-do compile { target c++11 } } is perhaps simpler.
> +/* If DCE removes too many CLOBBERs then stack usage goes through the
> + roof as stack slots can no longer be shared. */
> +/* { dg-additional-options "-Wstack-usage=200" { target x86_64-*-* i?86-*-* } } */
Jakub