public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR63844
@ 2014-11-19  9:27 Richard Biener
  2014-11-19  9:40 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2014-11-19  9:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek


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.

Thanks,
Richard. 

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.

Index: gcc/omp-low.c
===================================================================
--- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix PR63844
  2014-11-19  9:27 [PATCH] Fix PR63844 Richard Biener
@ 2014-11-19  9:40 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2014-11-19  9:40 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-19  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19  9:27 [PATCH] Fix PR63844 Richard Biener
2014-11-19  9:40 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).