On Wed, 18 Jan 2017, Richard Biener wrote:
> But I guess I was asking whether you could initially emit
> 
>  void *omp_simt = IFN_GOMP_SIMT_ENTER (0);
> 
>   for (int i = n1; i < n2; i++)
>      foo (&tmp);
> 
>   IFN_GOMP_SIMT_EXIT (omp_simt);
> 
> and only after inlining do liveness / use analysis of everything between
> SIMT_ENTER and SIMT_EXIT doing the rewriting only at that point.

No, I don't think so.  Such analysis would need to know whether the variable
was originally private to that SIMD region.  And we cannot allow the compiler
to move references to privatized data on per-lane stacks outside of their
regions (because the underlying per-lane storage is no longer available).  Hence
the need for explicit up-front privatization.

Alexander

Reply via email to