This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH] Fix PR63844


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


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