Re: maybe_fold_stmt (was: [gomp4] #pragma omp target* fixes)

2014-01-10 Thread Jakub Jelinek
On Fri, Jan 10, 2014 at 12:51:10PM +0100, Thomas Schwinge wrote: > > > +static bool > > > +maybe_fold_stmt (gimple_stmt_iterator *gsi) > > > +{ > > > + bool changed = false; > > > + struct gimplify_omp_ctx *ctx; > > > + for (ctx = gimplify_omp_ctxp; ctx; ctx = ctx->outer_context) > > > +if (

Re: maybe_fold_stmt (was: [gomp4] #pragma omp target* fixes)

2014-01-10 Thread Thomas Schwinge
Hi! Ping. On Thu, 19 Dec 2013 17:44:25 +0100, I wrote: > Ping. > > On Fri, 13 Dec 2013 11:13:03 +0100, I wrote: > > On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > > > 4) the reference testcase showed a problem with fold_stmt calls > > > we do very early, during gimplification, becaus

Re: maybe_fold_stmt (was: [gomp4] #pragma omp target* fixes)

2013-12-19 Thread Thomas Schwinge
Hi! Ping. On Fri, 13 Dec 2013 11:13:03 +0100, I wrote: > On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > > 4) the reference testcase showed a problem with fold_stmt calls > > we do very early, during gimplification, because for TREE_READONLY > > vars with DECL_INITIAL fold_stmt can rep

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-19 Thread Jakub Jelinek
On Thu, Dec 19, 2013 at 12:51:43PM +0100, Thomas Schwinge wrote: > OK for gomp-4_0-branch, and trunk (without the first hunk, obviously)? > > commit 1f4dbb1842804b39c3b7ac1e80783734516dc965 > Author: Thomas Schwinge > Date: Thu Dec 19 12:41:21 2013 +0100 > > Add clobber for object, after l

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-19 Thread Thomas Schwinge
Hi! On Wed, 18 Dec 2013 22:46:48 +0100, Jakub Jelinek wrote: > On Wed, Dec 18, 2013 at 09:03:40PM +0100, Thomas Schwinge wrote: > > On Mon, 16 Dec 2013 16:38:18 +0100, Jakub Jelinek wrote: > > > The reason for 3 separate arrays is that some of the values > > > are always variable, some are somet

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-18 Thread Jakub Jelinek
On Wed, Dec 18, 2013 at 09:03:40PM +0100, Thomas Schwinge wrote: > This one's owed to me still learning about GCC internals; if someone > could please be so kind to poit me to the appropriate documentation, or > explain: > > On Mon, 16 Dec 2013 16:38:18 +0100, Jakub Jelinek wrote: > > The reason

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-18 Thread Thomas Schwinge
Hi! This one's owed to me still learning about GCC internals; if someone could please be so kind to poit me to the appropriate documentation, or explain: On Mon, 16 Dec 2013 16:38:18 +0100, Jakub Jelinek wrote: > The reason for 3 separate arrays is that some of the values > are always variable,

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-17 Thread Thomas Schwinge
Hi! On Mon, 16 Dec 2013 17:58:26 +0100, Jakub Jelinek wrote: > I'd indeed prefer if you just used one > array, it can be say just uchar array of twice the width, with even chars > for alignment and odd for kinds (or vice versa), compared to two arrays > it is tiny bit cheaper at the caller side I

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-17 Thread Jakub Jelinek
On Tue, Dec 17, 2013 at 08:21:57PM +0100, Thomas Schwinge wrote: > On Mon, 16 Dec 2013 17:58:26 +0100, Jakub Jelinek wrote: > > I'd indeed prefer if you just used one > > array, it can be say just uchar array of twice the width, with even chars > > for alignment and odd for kinds (or vice versa),

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-16 Thread Jakub Jelinek
On Mon, Dec 16, 2013 at 05:35:36PM +0100, Thomas Schwinge wrote: > Sure, that's fine by me, and thanks for the explanation. > > > Plus, the change, being an ABI change, would need to be done on the > > trunk rather than just on gomp-4_0-branch. > > It's not an ABI change, as I had limited the cha

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-16 Thread Thomas Schwinge
Hi! On Mon, 16 Dec 2013 16:38:18 +0100, Jakub Jelinek wrote: > On Mon, Dec 16, 2013 at 08:41:02AM +0100, Thomas Schwinge wrote: > > Here is the patch I propose for gomp-4_0-branch; OK? > > No. The reason for 3 separate arrays is that some of the values > are always variable, some are sometimes

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-16 Thread Jakub Jelinek
On Mon, Dec 16, 2013 at 08:41:02AM +0100, Thomas Schwinge wrote: > Here is the patch I propose for gomp-4_0-branch; OK? No. The reason for 3 separate arrays is that some of the values are always variable, some are sometimes variable (sizes), some are never variable (alignment + kind). So, if anyt

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-15 Thread Thomas Schwinge
Hi! On Thu, 12 Dec 2013 10:53:02 +0100, I wrote: > On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > > 3) I figured out we need to tell the runtime library not just > > address, size and kind, but also alignment (we won't need that for > > the #pragma omp declare target global vars though

maybe_fold_stmt (was: [gomp4] #pragma omp target* fixes)

2013-12-13 Thread Thomas Schwinge
Hi! On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > 4) the reference testcase showed a problem with fold_stmt calls > we do very early, during gimplification, because for TREE_READONLY > vars with DECL_INITIAL fold_stmt can replace the uses of the var with > its initializer, but as the

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-12 Thread Thomas Schwinge
Hi! On Thu, 12 Dec 2013 11:02:30 +0100, Jakub Jelinek wrote: > On Thu, Dec 12, 2013 at 10:53:02AM +0100, Thomas Schwinge wrote: > > On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > > > 3) I figured out we need to tell the runtime library not just > > > address, size and kind, but also a

Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-12 Thread Jakub Jelinek
On Thu, Dec 12, 2013 at 10:53:02AM +0100, Thomas Schwinge wrote: > On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > > 3) I figured out we need to tell the runtime library not just > > address, size and kind, but also alignment (we won't need that for > > the #pragma omp declare target glo

GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

2013-12-12 Thread Thomas Schwinge
Hi! On Thu, 5 Sep 2013 18:11:05 +0200, Jakub Jelinek wrote: > 3) I figured out we need to tell the runtime library not just > address, size and kind, but also alignment (we won't need that for > the #pragma omp declare target global vars though), so that the > runtime library can properly align i

[gomp4] #pragma omp target* fixes

2013-09-05 Thread Jakub Jelinek
Hi! I've committed this patch to gomp4 branch to: 1) fix handling of reference based array sections - reference to array and reference to pointer. The latter actually needs 3 map clauses, one to map the array section, one to map the pointer to it, and one to map the reference to the pointer. 2) i