Re: [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-02 Thread Alexander Monakov
On Wed, 2 Dec 2015, Jakub Jelinek wrote: > Just wanted to see -fdump-tree-ompexp dump say from the testcase I've > posted. Does your patchset have any dependencies that aren't on the trunk? > If not, I guess I just could apply the patchset and look at the results, but > if there are, it would

Re: [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-02 Thread Jakub Jelinek
On Tue, Dec 01, 2015 at 06:28:27PM +0300, Alexander Monakov wrote: > @@ -10218,12 +10218,37 @@ expand_omp_simd (struct omp_region *region, struct > omp_for_data *fd) > >n1 = fd->loop.n1; >n2 = fd->loop.n2; > + step = fd->loop.step; > + bool do_simt_transform > += (cgraph_node::get

Re: [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-02 Thread Alexander Monakov
On Wed, 2 Dec 2015, Jakub Jelinek wrote: > expand_omp is depth-first expansion, so for the case where the simd > region is in lexically (directly or indirectly) nested inside of a > target region, the above will not trigger. You'd need to > use cgraph_node::get

Re: [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-02 Thread Jakub Jelinek
On Wed, Dec 02, 2015 at 04:54:39PM +0300, Alexander Monakov wrote: > On Wed, 2 Dec 2015, Jakub Jelinek wrote: > > expand_omp is depth-first expansion, so for the case where the simd > > region is in lexically (directly or indirectly) nested inside of a > > target region, the above will not

Re: [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-01 Thread Alexander Monakov
Apologies -- last-minute attempt to cleanup and enhance broke this patch; fixed version below. The main difference is checking whether we're transforming a loop that might be executed on the target: checking decl->offloadable isn't enough, because target region outlining might not have happened

[gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets

2015-12-01 Thread Alexander Monakov
This is incomplete. This handles OpenMP SIMD for NVPTX in simple cases, partly by punting on anything unusual such as simduid loops, partly by getting lucky, as testcases do not expose the missing bits. What it currently does is transform SIMD loop for (V = N1; V cmp N2; V + STEP) BODY; into