This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR63844
- 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: Wed, 19 Nov 2014 10:17:49 +0100
- Subject: Re: [PATCH] Fix PR63844
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1411191004280 dot 374 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 19, 2014 at 10:07:07AM +0100, Richard Biener wrote:
>
> The following improves code-generation for PR63844 by using
> a restrict qualified reference type for the OMP receiver decl.
> This improves alias analysis and points-to analysis enough to
> usually allow invariant and store motion where that was possible
> in the non-split-out variant.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk?
>
> Sadly I don't have a good testcase (for example one that wasn't
> vectorized before but is now). We can add one later - ISTR there
> were a few other bugs about not vectorizing with -fopenmp, I'll
> try to find them again and see whether they are fixed.
Most of those PRs should have openmp keyword.
> 2014-11-19 Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/63844
> * omp-low.c (fixup_child_record_type): Use a restrict qualified
> referece type for the receiver parameter.
Ok, thanks.
> --- gcc/omp-low.c (revision 217692)
> +++ gcc/omp-low.c (working copy)
> @@ -1517,7 +1517,8 @@ fixup_child_record_type (omp_context *ct
> layout_type (type);
> }
>
> - TREE_TYPE (ctx->receiver_decl) = build_pointer_type (type);
> + TREE_TYPE (ctx->receiver_decl)
> + = build_qualified_type (build_reference_type (type), TYPE_QUAL_RESTRICT);
> }
>
> /* Instantiate decls as necessary in CTX to satisfy the data sharing
Jakub