Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-02 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >>>> Now it follows the formula contained in >>>> the &quo

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-11 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >>>> Now it follows the formula contained in >>>> the &quo

[PATCH] Fix PR70828 - broken array-type subarrays inside acc data, in OpenACC

2018-07-20 Thread Cesar Philippidis
gt; I bootstrapped and regtested on x86_64/nvptx. Is it OK for trunk? Thanks, Cesar >From 3a58144cfaca8f6e3a889346e736e68a9ed17e6a Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Thu, 18 Aug 2016 01:12:15 + Subject: [PATCH 1/5] Fix PR70828s "broken array-type subarrays inside acc da

[PATCH] Add support for making maps 'private' inside OpenACC offloaded regions

2018-07-20 Thread Cesar Philippidis
ed regions 2018-XX-YY Chung-Lin Tang Cesar Philippidis gcc/ * tree.h (OMP_CLAUSE_MAP_PRIVATE): Define macro. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_PRIVATE enum value. (omp_add_variable): Add GOVD_MAP_PRIVATE to reduction clause flags if not a gang-partiti

[PATCH] Privatize independent OpenACC reductions

2018-07-20 Thread Cesar Philippidis
apped and regtested on x86_64/nvptx. Is it OK for trunk? Thanks, Cesar >From a4753e2b40cf3d707aabd7c9d5bad7d8f9be8b6f Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Fri, 26 Jan 2018 08:30:13 -0800 Subject: [PATCH 3/5] Privatize independent OpenACC reductions 2018-XX-YY Cesar Phi

[PATCH] Enable firstprivate OpenACC reductions

2018-07-20 Thread Cesar Philippidis
00:00:00 2001 From: Cesar Philippidis Date: Wed, 31 Jan 2018 07:21:53 -0800 Subject: [PATCH 4/5] Enable firstprivate OpenACC reductions 2018-XX-YY Cesar Philippidis gcc/ * gimplify.c (omp_add_variable): Allow certain OpenACC reduction variables to remain firstprivate. gcc/testsuite/ *

[PATCH] Adjust offsets for present data clauses

2018-07-20 Thread Cesar Philippidis
/nvptx. Is it OK for trunk? Thanks, Cesar >From fb743d8a45193c177cb0082400d140949e8c1e6d Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Wed, 24 Aug 2016 00:02:50 + Subject: [PATCH 5/5] [libgomp, OpenACC] Adjust offsets for present data clauses 2018-XX-YY Cesar Philippidis

[PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/fortran/ * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the location of combined acc loops. (cherry picked from gomp-4_0-branch r245653) diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-ope

[PATCH 0/3] Add OpenACC diagnostics to -fopt-info-note-omp

2018-07-25 Thread Cesar Philippidis
This patch series extends -fopt-info-note-omp to include OpenACC loop diagnostics when it is used in conjunction with -fopenacc. At present, the diagnostics are limited to reporting how OpenACC loops are partitioned, e.g., seq, gang, worker or vector. The major advantage of this diagnostics is that

[PATCH 2/3] Correct the reported line number in c++ combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
able to resolve a couple of long standing diagnostics discrepancies between the c/c++ FEs in the test suite. Is this patch OK for trunk? I bootstrapped and regtested using x86_64 with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/cp/ * par

[PATCH 3/3] Add user-friendly OpenACC diagnostics regarding detected parallelism.

2018-07-25 Thread Cesar Philippidis
distinguish which parallelism was specified by the user and which was assigned by the compiler. But that can be added in a follow up patch. Is this patch OK for trunk? I bootstrapped and regtested it for x86_64 with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc

Re: [PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
On 07/25/2018 08:32 AM, Marek Polacek wrote: > On Wed, Jul 25, 2018 at 08:29:17AM -0700, Cesar Philippidis wrote: >> The fortran FE incorrectly records the line locations of combined acc >> loop directives when it lowers the construct to gimple. Usually this >> isn't a p

Re: [PATCH 00/11] [nvptx] Initial vector length changes

2018-07-25 Thread Cesar Philippidis
On 07/24/2018 01:47 PM, ce...@codesourcery.com wrote: > From: Cesar Philippidis > > This patch series contains various cleanups and structural > reorganizations to the NVPTX BE in preparation for the forthcoming > variable length vector length enhancements. Tom, in order to make

Re: [PATCH 3/3] Add user-friendly OpenACC diagnostics regarding detected parallelism.

2018-07-26 Thread Cesar Philippidis
On 07/26/2018 01:33 AM, Richard Biener wrote: > On Wed, Jul 25, 2018 at 5:30 PM Cesar Philippidis > wrote: >> >> This patch teaches GCC to inform the user how it assigned parallelism >> to each OpenACC loop at compile time using the -fopt-info-note-omp >> fla

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Cesar Philippidis
Hi Tom, I see that you're reviewing the libgomp changes. Please disregard the following hunk: On 07/11/2018 12:13 PM, Cesar Philippidis wrote: > @@ -1199,12 +1202,59 @@ nvptx_exec (void (*fn), size_t mapnum, void > **hostaddrs, void **devaddrs, >

Re: [PATCH 0/8] Reduce/remove dependencies on _GLIBCXX_USE_C99_STDINT_TR1

2018-07-26 Thread Cesar Philippidis
On 07/26/2018 07:01 AM, jwak...@redhat.com wrote: > From: Jonathan Wakely It looks like you're using git send-email for this patch series. And it seems like you made the same mistake that I did when you configured git sendmail.from. According to the git sent-email manpage, from should be your ema

Re: [libgomp, nvptx, committed] Calculate default dims per device

2018-07-30 Thread Cesar Philippidis
On 07/30/2018 03:19 AM, Tom de Vries wrote: > > [libgomp, nvptx] Calculate default dims per device > > The default dimensions are calculated using per-device properties, but > initialized once and used on all devices. > > This patch fixes this problem by introducing per-device default dimensions

[PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-07-31 Thread Cesar Philippidis
existing defaults. Maybe the og8 thread occupancy would make a better default for older versions of CUDA, but that's a patch for another day. Is this patch OK for trunk? I bootstrapped and regression tested it using x86_64 with nvptx offloading. Thanks, Cesar [nvptx] Use CUDA driver API to se

[PATCH,nvptx] Remove use of 'struct map' from plugin (nvptx)

2018-07-31 Thread Cesar Philippidis
[PATCH] Remove use of 'struct map' from plugin (nvptx) 2018-XX-YY Cesar Philippidis James Norris libgomp/ * plugin/plugin-nvptx.c (struct map): Removed. (map_init, map_pop): Remove use of struct map. (map_push): Likewise and change argument list. * testsuite/libgom

[PATCH,nvptx] Remove use of CUDA unified memory in libgomp

2018-07-31 Thread Cesar Philippidis
s this patch OK for trunk? I bootstrapped and regression tested it for x86_64 with nvptx offloading. Thanks, Cesar [PATCH] [nvptx] Remove use of CUDA unified memory in libgomp 2018-XX-YY Cesar Philippidis libgomp/ * plugin/plugin-nvptx.c (struct cuda_map): New. (struct ptx_stream): Replac

[PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-07-31 Thread Cesar Philippidis
bootstrapped and regtested for x86_64 with nvptx offloading. Thanks, Cesar [PATCH] [libgomp] Truncate config/nvptx/oacc-parallel.c 2018-XX-YY Cesar Philippidis Thomas Schwinge libgomp/ * config/nvptx/oacc-parallel.c: Truncate. (cherry picked from gomp-4_0-branch r228836) --- libgomp

[og8] Add __builtin_goacc_parlevel_{id,size}

2018-07-31 Thread Cesar Philippidis
Cesar [og8] Add __builtin_goacc_parlevel_{id,size} 2018-07-31 Cesar Philippidis Backport from mainline: 2018-05-02 Tom de Vries PR libgomp/82428 gcc/ * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define. * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID) (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin

[og8] More goacc_parlevel enhancements

2018-07-31 Thread Cesar Philippidis
ancements 2018-07-31 Cesar Philippidis libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Adjust test. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-

[patch] combine ICE fix

2013-10-10 Thread Cesar Philippidis
and no regressions showed up. Thanks, Cesar 2013-10-10 Cesar Philippidis gcc/ * regs.h (REG_N_GROW): New function. * combine.c (combine_split_insns): Call REG_N_GROW when new registers are created. Index: gcc/regs.h

Re: [patch] combine ICE fix

2013-10-11 Thread Cesar Philippidis
but instead the df stuff. I was thinking about converting that array to a vec. But I don't want to touch more code than I have to right now. Is this OK as a stopgap? Thanks for the review! Cesar 2013-10-11 Cesar Philippidis gcc/ * regs.h (REG_N_GROW): New function.

Re: [patch] combine ICE fix

2013-10-16 Thread Cesar Philippidis
On 10/15/13 12:16 PM, Jeff Law wrote: > On 10/10/13 10:25, Jakub Jelinek wrote: >> On Thu, Oct 10, 2013 at 07:26:43AM -0700, Cesar Philippidis wrote: >>> This patch addresses an ICE when building qemu for a Mips target in >>> Yocto. Both gcc-trunk, gcc-4.8 and all of

Re: [PATCH] libgomp testsuite fixes

2013-10-24 Thread Cesar Philippidis
On 6/20/13 9:49 AM, Mike Stump wrote: > On May 30, 2013, at 12:59 PM, Cesar Philippidis > wrote: >> Here is a patch from our backlog at Mentor Graphics that addresses a >> libgomp issue where setting ENABLE_LTO=1 in site.exp causes the following >> error with dejagnu

[PATCH] libstdc++ testsuite cxxflags

2013-10-28 Thread Cesar Philippidis
ot;-g -O2" at minimum when no other optimization flags are specified. The testsuite used to set those flags prior to Benjamin's patch to remove duplicate cxxflags here <http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01572.html>. Is this OK for trunk? If so, please apply. Thanks, Cesar 20

Re: [gomp4] fix c++ reference mappings in openacc

2016-01-20 Thread Cesar Philippidis
On 01/20/2016 07:46 PM, Cesar Philippidis wrote: > I've applied this patch to gomp-4_0-branch which fixes of problems > involving reference type variables in openacc data clauses. The first > problem was, the c++ front end was incorrectly handling reference types > in general in

[gomp4] fix c++ reference mappings in openacc

2016-01-20 Thread Cesar Philippidis
I've applied this patch to gomp-4_0-branch which fixes of problems involving reference type variables in openacc data clauses. The first problem was, the c++ front end was incorrectly handling reference types in general in openacc. Instead of mapping the variable, it would map the pointer to the va

[openacc] reference-typed data mappings

2016-02-01 Thread Cesar Philippidis
u add more test coverage or tell me what should be included? Is this patch ok for trunk? Cesar 2016-02-01 Cesar Philippidis gcc/c/ * c-typeck.c (c_finish_omp_clauses): Report OMP_CLAUSE_MAP errors as data clause errors for OpenACC. gcc/cp/ * cp-tree.h (finish_omp_clauses): Update

Re: [openacc] reference-typed data mappings

2016-02-09 Thread Cesar Philippidis
On 02/01/2016 09:57 AM, Cesar Philippidis wrote: > This patch fixes a couple of bugs preventing c++ reference-typed > variables from working in openacc data clauses. These fixes include: > > * Teach the gimplifier to filter out pointer data mappings for >OACC_DATA,

openacc reference reductions

2016-02-09 Thread Cesar Philippidis
. Without those separate pointers, I'd get SSA validation errors because those pointers get deferenced multiple times. I didn't investigate that problem further. Is this patch ok for trunk? Cesar 2016-02-09 Cesar Philippidis gcc/ * omp-low.c (is_oacc_parallel

Re: openacc reference reductions

2016-02-09 Thread Cesar Philippidis
ue; >> + >> + return false; >> +} >> + Thanks for catching that. Those are artifacts from when this code used to be located exclusively in scan_sharing_clauses. I've updated the patch with those changes. Cesar 2016-02-09 Cesar Philippidis gcc/

Re: [openacc] reference-typed data mappings

2016-02-09 Thread Cesar Philippidis
On 02/09/2016 07:00 AM, Cesar Philippidis wrote: > On 02/01/2016 09:57 AM, Cesar Philippidis wrote: > >> > This patch fixes a couple of bugs preventing c++ reference-typed >> > variables from working in openacc data clauses. These fixes include: >> > >>

[openacc] vector state propagation

2016-02-22 Thread Cesar Philippidis
end should be able to broadcast the origin u32 register directly. Is there a better way to resolve this issue, or is this patch OK for trunk as-is? Cesar 2016-02-22 Cesar Philippidis gcc/ * config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode and HImode register. libgomp/ *

Re: openacc reference reductions

2016-02-22 Thread Cesar Philippidis
Ping. This patch still needs a review. Cesar On 02/09/2016 08:17 AM, Cesar Philippidis wrote: > On 02/09/2016 07:33 AM, Nathan Sidwell wrote: >> While I've not looked at the rest of the patch, this bit stood out: >> >>> +static bool >>> +is_oacc_parallel

Re: [openacc] reference-typed data mappings

2016-02-22 Thread Cesar Philippidis
Ping. Cesar On 02/09/2016 09:05 AM, Cesar Philippidis wrote: > On 02/09/2016 07:00 AM, Cesar Philippidis wrote: >> On 02/01/2016 09:57 AM, Cesar Philippidis wrote: >> >>>> This patch fixes a couple of bugs preventing c++ reference-typed >>>> variables from

Re: [patch] combine ICE fix

2013-11-27 Thread Cesar Philippidis
On 10/16/13, 11:03 AM, Jeff Law wrote: > On 10/16/13 09:34, Cesar Philippidis wrote: >> On 10/15/13 12:16 PM, Jeff Law wrote: >>> On 10/10/13 10:25, Jakub Jelinek wrote: >>>> On Thu, Oct 10, 2013 at 07:26:43AM -0700, Cesar Philippidis wrote: >>>>> This

Re: [gomp4, fortran] Patch to fix continuation checks of OpenACC and OpenMP directives

2015-07-14 Thread Cesar Philippidis
t;>> >>> Thanks for your review! >>> >>> 08.06.2015, 17:59, "Cesar Philippidis" : >>>> On 06/07/2015 02:05 PM, Ilmir Usmanov wrote: >>>>>Fixed fortran mail-list address. Sorry for inconvenience. >>>>> >>&

[gomp4] OpenACC vector and worker reductions

2015-07-17 Thread Cesar Philippidis
e welcome. Is this reduction scheme too nvptx-specific? I'll post the test cases in a follow up patch because the patch would be too big for the mailing list otherwise. Thanks, Cesar 2015-07-17 Cesar Philippidis gcc/ * config/nvptx/nvptx.c (nvptx_generate_vector_shuffle): New fun

[gomp4] OpenACC reduction tests

2015-07-17 Thread Cesar Philippidis
too confusing too debug. The fortran tests are a bit of a lost clause, unless someone knows how to use the preprocessor with !$acc loops. Cesar 2015-07-17 Cesar Philippidis libgomp/ * testsuite/libgomp.oacc-c-c++-common/reduction.h: New file. * testsuite/libgomp.oacc-c-c++-common/reduction-1

[gomp4] cleanup firstprivate test case

2015-07-17 Thread Cesar Philippidis
15-07-17 Cesar Philippidis libgomp/ * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: Remove omp pragma. diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c index e5fc6a0..69abb23 100644 --- a/li

[gomp4] Add new oacc_transform patch

2015-07-21 Thread Cesar Philippidis
27;m expanding those calls using target machine hooks. This pass will run after lto on the target compiler. Thanks, Cesar 2015-07-21 Cesar Philippidis gcc/ * omp-low.c (execute_oacc_transform): New function. (class pass_oacc_transform): New function. (make_pass_oacc_transform): New function

[patch] PR66714 -- Re: Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-23 Thread Cesar Philippidis
nd MEM_REFs. I suspect that I may be missing some, but these are the only ones that were triggered gcc_unreachable during testing. As Tom mentioned in PR66714, this bug is present on trunk, specifically in code using omp targets. Is this patch OK for trunk? I bootstrapped and tested on x86_64-li

Re: [patch] PR66714 -- Re: Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-23 Thread Cesar Philippidis
On 07/23/2015 08:32 AM, Jakub Jelinek wrote: > On Thu, Jul 23, 2015 at 08:20:50AM -0700, Cesar Philippidis wrote: >> The attached patch does just that; it teaches >> replace_block_vars_by_duplicates to replace the decls inside the >> value-exprs with a duplicate too. It'

Re: [patch] PR66714 -- Re: Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-24 Thread Cesar Philippidis
On 07/23/2015 03:11 PM, Jakub Jelinek wrote: > On Thu, Jul 23, 2015 at 03:01:25PM -0700, Cesar Philippidis wrote: >> On 07/23/2015 08:32 AM, Jakub Jelinek wrote: >>> On Thu, Jul 23, 2015 at 08:20:50AM -0700, Cesar Philippidis wrote: >>>> The attached pa

[gomp4] acc routines bugfix

2015-07-24 Thread Cesar Philippidis
ves having two compilers present. I wonder if it's ok to have libgomp check for compiler expected compiler errors? However, that's more of a gcc/testsuite type of check. I don't think trunk has much support for acc routines just yet, so I applied this patch to gomp-4_0-branch for

Re: [gomp4] acc routines bugfix

2015-07-24 Thread Cesar Philippidis
On 07/24/2015 08:21 AM, Ilya Verbin wrote: > On Fri, Jul 24, 2015 at 08:05:00 -0700, Cesar Philippidis wrote: >> The second point is interesting. Offloaded functions require the "omp >> target" attribute or that function won't reach the lto compiler. That's

Re: [gomp4] Add new oacc_transform patch

2015-07-28 Thread Cesar Philippidis
On 07/28/2015 02:21 AM, Thomas Schwinge wrote: > Cesar, please address the following compiler diagnostig: > >> 2015-07-21 Cesar Philippidis >> >> gcc/ >> * omp-low.c (execute_oacc_transform): New function. >> (clas

Re: [gomp4] fix spinlock

2015-08-06 Thread Cesar Philippidis
olution ok as-is for gomp-4_0-branch? Thanks, Cesar 2015-08-06 Cesar Philippidis gcc/ * config/nvptx/nvptx.c (nvptx_expand_lock_unlock): Pass an additional scratch register to gen_nvptx_spinlock. * config/nvptx/nvptx.md (nvptx_membar): Use %B for the address space operand. (nvptx_spinlock

Re: [gomp4] Redesign oacc_parallel launch API

2015-08-06 Thread Cesar Philippidis
On 07/28/2015 09:52 AM, Nathan Sidwell wrote: > I've committed this patch to the gomp4 branch to redo the launch API. > I'll post a version for trunk once the versioning patch gets approved & > committed. > > This changes the API in a number of ways, allowing device-specific > knowledge to be mov

Re: [gomp4] Worker reduction builtin

2015-08-06 Thread Cesar Philippidis
wred.c: In function ‘main._omp_fn.0’: wred.c:9:9: error: unrecognizable insn: #pragma acc parallel loop vector_length (32) num_workers (32) worker reduction (+:red) copy (red) ^ (insn 28 27 29 2 (set (reg:DI 59) (plus:DI (symbol_ref:DI ("__worker_red")) (const

Re: [gomp4, wip] remove references to ganglocal shared memory inside gcc

2015-09-18 Thread Cesar Philippidis
On 09/18/2015 01:39 AM, Thomas Schwinge wrote: > On Tue, 1 Sep 2015 18:29:55 +0200, Tom de Vries > wrote: >> On 27/08/15 03:37, Cesar Philippidis wrote: >>> - ctx->ganglocal_size_host = align_and_expand (&gl_host, host_size, align); >> >> I

Re: New post-LTO OpenACC pass

2015-09-21 Thread Cesar Philippidis
, /* todo_flags_start */ > + TODO_update_ssa | TODO_cleanup_cfg, /* todo_flags_finish */ > +}; Cesar 2015-09-21 Cesar Philippidis gcc/ * doc/invoke.texi: Document -fdump-tree-oacc_xforms. * omp-low.c (pass_data_oacc_transform): Rename the tree dump for oacc_transform as oacc_xforms. diff --git a/gcc/

OpenACC subarray data alignment in fortran

2015-09-22 Thread Cesar Philippidis
as-is because I'm not that familiar with how non-OpenMP target regions get lowered. Is this patch OK for trunk? Thanks, Cesar 2015-09-22 Cesar Philippidis gcc/ * fortran/trans-openmp.c (gfc_omp_finish_clause): Don't cast ptr into a character pointer. (gfc_trans_omp_clauses_1)

[gomp4] implicit data mappings of dummy arguments

2015-09-22 Thread Cesar Philippidis
pping. This patch teaches the gimplifier to do that. This corrects a bug where a dummy array gets implicitly transferred as firstprivate instead of pcopy. I've applied patch has been committed to gomp-4_0-branch. Cesar 2015-09-22 Cesar Philippidis gcc/ * gimplify.c (oacc_default_clause

[gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
Gang, worker, vector and collapse all contain optional arguments which may be used during loop expansion. In OpenACC, those expressions could contain variables, but those variables aren't always getting remapped automatically. This patch remaps those variables inside lower_omp_loop. Note that I di

Re: [gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
On 09/23/2015 10:42 AM, Cesar Philippidis wrote: > I've applied this patch to gomp-4_0-branch. This patch, that is. Cesar 2015-09-23 Cesar Philippidis gcc/ * omp-low.c (lower_omp_for): Remap any variables present in OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VE

Re: [gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
On 09/23/2015 11:26 AM, Thomas Schwinge wrote: > On Wed, 23 Sep 2015 10:57:40 -0700, Cesar Philippidis > wrote: >> On 09/23/2015 10:42 AM, Cesar Philippidis wrote: >> | Gang, worker, vector and collapse all contain optional arguments which >> | may be used during lo

Re: [gomp4] Another oacc reduction simplification

2015-09-24 Thread Cesar Philippidis
On 09/22/2015 08:29 AM, Nathan Sidwell wrote: > 1) Don't have a fake gang reduction outside of worker & vector loops. > Deal with the receiver object directly. I.e. 'ref_to_res' need not be a > null pointer for vector and worker loops. What happens when there is no receiver object. E.g. a reduc

Re: [gomp4] Another oacc reduction simplification

2015-09-25 Thread Cesar Philippidis
On 09/25/2015 03:57 AM, Nathan Sidwell wrote: > On 09/24/15 16:32, Cesar Philippidis wrote: >> On 09/22/2015 08:29 AM, Nathan Sidwell wrote: >> >>> 1) Don't have a fake gang reduction outside of worker & vector loops. >>> Deal with the receiver object

[gomp4] error on acc loops not associated with offloaded acc regions

2015-09-28 Thread Cesar Philippidis
is kind of long. Let me know if it should be revised. Cesar 2015-09-28 Cesar Philippidis gcc/ * omp-low.c (check_omp_nesting_restrictions): Check for acc loops not associated with acc regions or routines. gcc/testsuite/ * c-c++-common/goacc/non-routine.c: New test. * c-c++-common/goacc-gomp

Re: OpenACC subarray data alignment in fortran

2015-09-29 Thread Cesar Philippidis
Ping. In the meantime, I'll apply this patch to gomp-4_0-branch. Cesar On 09/22/2015 08:24 AM, Cesar Philippidis wrote: > In both OpenACC and OpenMP, each subarray has at least two data mappings > associated with them, one for the pointer and another for the data in > the array s

Re: [gomp4] error on acc loops not associated with offloaded acc regions

2015-09-29 Thread Cesar Philippidis
On 09/29/2015 02:48 AM, Thomas Schwinge wrote: > On Mon, 28 Sep 2015 10:08:34 -0700, Cesar Philippidis > wrote: >> I've applied this patch to gomp-4_0-branch which teaches omplower how to >> error when it detects acc loops which aren't nested inside an acc >

[gomp4] tile clause asterisk argument

2015-09-30 Thread Cesar Philippidis
ed in omplow. I've applied this patch to gomp-4_0-branch. Cesar 2015-09-30 Cesar Philippidis gcc/fortran/ * openmp.c (resolve_oacc_loop_blocks): Represent astrisk tile arguments as -1. gcc/testsuite/ * gfortran.dg/goacc/loop-5.f95: New test. diff --git a/gcc/fortran/openmp.c b/g

[gomp4] handle missing OMP_LIST_ clauses in fortran's parse tree debugger

2015-10-01 Thread Cesar Philippidis
atches the enum in gfortran.h because I couldn't figure out how things were ordered before. I've applied this patch to gomp-4_0-branch. Cesar 2015-10-01 Cesar Philippidis gcc/fortran/ * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types and reorder the switch cases

[gomp4] privatize internal array variables introduced by the fortran FE

2015-10-13 Thread Cesar Philippidis
reason why only certain arrays have array descriptors? The arrays with descriptors don't have this problem. It's only the ones without descriptors that leak new internal variables that cause errors with default(none). Cesar 2015-10-13 Cesar Philippidis gcc/fortr

Re: [gomp4] privatize internal array variables introduced by the fortran FE

2015-10-13 Thread Cesar Philippidis
On 10/13/2015 01:29 PM, Jakub Jelinek wrote: > On Tue, Oct 13, 2015 at 01:12:25PM -0700, Cesar Philippidis wrote: >> Arrays in fortran have a couple of internal variables associated with >> them, e.g. stride, lbound, ubound, size, etc. Depending on how and where >> the arra

Re: [gomp4 03/14] nvptx: expand support for address spaces

2015-10-20 Thread Cesar Philippidis
On 10/20/2015 02:13 PM, Bernd Schmidt wrote: > On 10/20/2015 11:04 PM, Alexander Monakov wrote: >> On Tue, 20 Oct 2015, Bernd Schmidt wrote: >> >>> On 10/20/2015 08:34 PM, Alexander Monakov wrote: This allows to emit decls in 'shared' memory from the middle-end. * config/nvptx/nvpt

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Cesar Philippidis
On 10/22/2015 07:23 AM, Nathan Sidwell wrote: > On 10/22/15 10:05, Jakub Jelinek wrote: >> On Thu, Oct 22, 2015 at 09:53:46AM -0400, Nathan Sidwell wrote: >>> On 10/22/15 05:37, Jakub Jelinek wrote: >>> And, I must say I'm at least missing testcases that check parsing but also runtim

Re: [OpenACC 11/11] execution tests

2015-10-22 Thread Cesar Philippidis
On 10/22/2015 08:00 AM, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 07:47:01AM -0700, Cesar Philippidis wrote: >>> But it is unclear from the parsing what from these is allowed: >> >> int v, w; >> ... >> gang(26) // equivalent to gang(num:26) >> gan

more accurate omp in fortran

2015-10-22 Thread Cesar Philippidis
accurate. I've also split off the check for variables appearing in multiple clauses into a separate function. It's a little overkill for trunk right now, but it is used quite a bit in gomp4 for oacc declare. I've tested these changes on x86_64. Is this ok for trunk? Cesar 2015-10

Re: Re: [OpenACC 4/11] C FE changes

2015-10-23 Thread Cesar Philippidis
On 10/22/2015 01:22 AM, Jakub Jelinek wrote: > On Wed, Oct 21, 2015 at 03:16:20PM -0400, Nathan Sidwell wrote: >> 2015-10-20 Cesar Philippidis >> Thomas Schwinge >> James Norris >> Joseph Myers >> Julia

Re: Re: [OpenACC 5/11] C++ FE changes

2015-10-23 Thread Cesar Philippidis
= integer_one_node; >> - } >> - t = fold_build_cleanup_point_expr (TREE_TYPE (t), t); >> -} >> - OMP_CLAUSE_NUM_THREADS_EXPR (c) = t; >> -} >> +case OMP_CLAUSE_NUM_GANGS: >> +case OM

Re: [OpenACC 11/11] execution tests

2015-10-23 Thread Cesar Philippidis
On 10/22/2015 08:00 AM, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 07:47:01AM -0700, Cesar Philippidis wrote: >>> But it is unclear from the parsing what from these is allowed: >> >> int v, w; >> ... >> gang(26) // equivalent to gang(num:26) >> gan

Re: [OpenACC 4/11] C FE changes

2015-10-23 Thread Cesar Philippidis
On 10/23/2015 01:31 PM, Jakub Jelinek wrote: > On Fri, Oct 23, 2015 at 01:17:07PM -0700, Cesar Philippidis wrote: >> Good idea, thanks. This patch also corrects the problems parsing weird >> combinations of num, static and length arguments that you mentioned >> elsewhere.

Re: [OpenACC 4/11] C FE changes

2015-10-23 Thread Cesar Philippidis
On 10/23/2015 02:31 PM, Cesar Philippidis wrote: > On 10/23/2015 01:31 PM, Jakub Jelinek wrote: >> On Fri, Oct 23, 2015 at 01:17:07PM -0700, Cesar Philippidis wrote: >>> Good idea, thanks. This patch also corrects the problems parsing weird >>> combinations of num, stati

Re: [OpenACC 5/11] C++ FE changes

2015-10-23 Thread Cesar Philippidis
On 10/23/2015 01:25 PM, Cesar Philippidis wrote: > On 10/22/2015 01:52 AM, Jakub Jelinek wrote: >> On Wed, Oct 21, 2015 at 03:18:55PM -0400, Nathan Sidwell wrote: >>> This patch is the C++ changes matching the C ones of patch 4. In >>> finish_omp_clauses, the gang, w

Re: [OpenACC 11/11] execution tests

2015-10-23 Thread Cesar Philippidis
On 10/23/2015 01:29 PM, Cesar Philippidis wrote: > On 10/22/2015 08:00 AM, Jakub Jelinek wrote: >> On Thu, Oct 22, 2015 at 07:47:01AM -0700, Cesar Philippidis wrote: >>>> But it is unclear from the parsing what from these is allowed: >>> >>> int v, w; >

Re: [OpenACC 4/11] C FE changes

2015-10-24 Thread Cesar Philippidis
On 10/24/2015 01:03 AM, Jakub Jelinek wrote: > On Fri, Oct 23, 2015 at 07:31:51PM -0700, Cesar Philippidis wrote: > >> +static tree >> +c_parser_oacc_shape_clause (c_parser *parser, omp_clause_code kind, >> +const char *str, tree list) >>

Re: [OpenACC 5/11] C++ FE changes

2015-10-24 Thread Cesar Philippidis
On 10/23/2015 07:37 PM, Cesar Philippidis wrote: > On 10/23/2015 01:25 PM, Cesar Philippidis wrote: >> On 10/22/2015 01:52 AM, Jakub Jelinek wrote: >>> On Wed, Oct 21, 2015 at 03:18:55PM -0400, Nathan Sidwell wrote: >>>> This patch is the C++ changes match

Re: [OpenACC 4/11] C FE changes

2015-10-26 Thread Cesar Philippidis
On 10/26/2015 01:59 AM, Jakub Jelinek wrote: > Ok for trunk with those changes fixed. Here's the patch with those changes. Nathan will commit this patch the rest of the openacc execution model patches. Thanks, Cesar 2015-10-26 Cesar Philippidis Thomas Schwinge Jame

Re: [OpenACC 5/11] C++ FE changes

2015-10-26 Thread Cesar Philippidis
On 10/26/2015 03:20 AM, Jakub Jelinek wrote: > On Sat, Oct 24, 2015 at 02:11:41PM -0700, Cesar Philippidis wrote: >> --- a/gcc/cp/semantics.c >> +++ b/gcc/cp/semantics.c >> @@ -5911,6 +5911,31 @@ finish_omp_clauses (tree clauses, bool allow_fields,

Re: more accurate error messages omp in fortran

2015-10-27 Thread Cesar Philippidis
(was "Re: more accurate omp in fortran" Ping. Cesar On 10/22/2015 08:21 AM, Cesar Philippidis wrote: > Currently, for certain omp and oacc errors the fortran will inaccurately > report exactly where in the omp/acc construct the error has occurred. E.g. > >!$acc par

Re: Re: [Bulk] [OpenACC 0/7] host_data construct

2015-10-27 Thread Cesar Philippidis
On 10/26/2015 11:34 AM, Jakub Jelinek wrote: > On Fri, Oct 23, 2015 at 10:51:42AM -0500, James Norris wrote: >> @@ -12942,6 +12961,7 @@ c_finish_omp_clauses (tree clauses, bool is_omp, >> bool declare_simd) >> case OMP_CLAUSE_GANG: >> case OMP_CLAUSE_WORKER: >> case OMP_CLAUSE_VECTO

[gomp4] fortran cleanups and c/c++ loop parsing backport

2015-10-27 Thread Cesar Philippidis
ch in my source tree. Cesar 2015-10-27 Cesar Philippidis gcc/c/ * c-parser.c (c_parser_oacc_shape_clause): Backport from trunk. (c_parser_omp_simple_clause): Likewise. (c_parser_oacc_all_clauses): Likewise. gcc/cp/ * parser.c (cp_parser_oacc_shape_clause): Backport from trunk. (cp_par

Re: [gomp4] fortran cleanups and c/c++ loop parsing backport

2015-10-28 Thread Cesar Philippidis
On 10/28/2015 04:00 AM, Thomas Schwinge wrote: > Hi Cesar! > > On Tue, 27 Oct 2015 11:36:10 -0700, Cesar Philippidis > wrote: >> This patch contains the following: >> >> * C front end changes from trunk: >> https://gcc.gnu.org/ml/gcc-patches/2015-10/m

Re: [OpenACC] declare directive

2015-10-28 Thread Cesar Philippidis
On 10/27/2015 01:18 PM, James Norris wrote: > This patch adds the processing of OpenACC declare directive in C > and C++. (Note: Support in Fortran is already in trunk.) > Commentary on the changes is included as an attachment (NOTES). A quick diff of gomp4 and trunk reveals quite a f

[gomp4] minor cfe backports

2015-10-28 Thread Cesar Philippidis
num_gangs, num_workers and vector_length in gomp4. But support for those clauses are already present in trunk. I'll post more details with the patch later. Cesar 2015-10-28 Cesar Philippidis * gcc/c/c-parser.c (c_parser_oacc_simple_clause): New function. (c_parser_oacc_all_clauses): Us

[gomp4] revert num_gangs, num_workers, vector_length and num_threads parser changes in c/c++

2015-10-29 Thread Cesar Philippidis
In gomp-4_0-branch, we've tried to consolidate the parsing all of the clauses of the form foo (int-expression) into a single c*_parser_omp_positive_int_clause function. At the time, such clauses included num_gangs, num_workers, vector_length and num_threads. Looking at OpenMP 4.5, there are add

Re: [gomp4] revert num_gangs, num_workers, vector_length and num_threads parser changes in c/c++

2015-10-29 Thread Cesar Philippidis
On 10/29/2015 07:08 AM, Cesar Philippidis wrote: > In gomp-4_0-branch, we've tried to consolidate the parsing all of the > clauses of the form > > foo (int-expression) > > into a single c*_parser_omp_positive_int_clause function. At the time, > such clauses inclu

[OpenACC] num_gangs, num_workers and vector_length in c++

2015-10-29 Thread Cesar Philippidis
sion tested and bootstrapped on x86_64-linux. Cesar 2015-10-29 Cesar Philippidis gcc/cp/ * parser.c (cp_parser_oacc_positive_int_clause): New function. (cp_parser_oacc_clause_vector_length): Delete. (cp_parser_omp_clause_num_gangs): Delete. (cp_parser_omp_clause_num_w

Re: [OpenACC] num_gangs, num_workers and vector_length in c++

2015-10-30 Thread Cesar Philippidis
On 10/30/2015 06:37 AM, Jakub Jelinek wrote: > On Thu, Oct 29, 2015 at 04:02:11PM -0700, Cesar Philippidis wrote: >> I noticed that num_gangs, num_workers and vector_length are parsed in >> somewhat insistent ways in the c++ FE. Both vector_length and num_gangs >> bail out whe

Re: more accurate omp in fortran

2015-10-30 Thread Cesar Philippidis
On 10/30/2015 07:47 AM, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 08:21:35AM -0700, Cesar Philippidis wrote: >> diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h >> index b2894cc..93adb7b 100644 >> --- a/gcc/fortran/gfortran.h >> +++ b/gcc/fortran/gfort

Re: more accurate omp in fortran

2015-10-30 Thread Cesar Philippidis
On 10/30/2015 09:58 AM, Jakub Jelinek wrote: > What I meant not just the above changes, but also all changes that > replace where with &n->where and the like, so pretty much everything > except for the oacc_compatible_clauses removal and addition of > resolve_omp_duplicate_list. That is kind of u

Re: [patch] New backend header reduction

2015-10-30 Thread Cesar Philippidis
d compiler for openacc. It looks like cgraph.c needs to include context.h and varpool.c needs context.h and omp-low.h. There's a couple of ifdef ENABLE_OFFLOADING which may have gone undetected with your script. I've bootstrapped the attached patch for an nvptx/x86_64-linux target. I&#

Re: [patch] New backend header reduction

2015-10-30 Thread Cesar Philippidis
On 10/30/2015 01:20 PM, Andrew MacLeod wrote: > On 10/30/2015 02:09 PM, Andrew MacLeod wrote: >> On 10/30/2015 01:56 PM, Cesar Philippidis wrote: >>> On 10/23/2015 12:24 PM, Jeff Law wrote: >>>> On 10/23/2015 10:53 AM, Andrew MacLeod wrote: >>>> >>&

Re: [OpenACC] num_gangs, num_workers and vector_length in c++

2015-10-30 Thread Cesar Philippidis
On 10/30/2015 10:05 AM, Jakub Jelinek wrote: > On Fri, Oct 30, 2015 at 07:42:39AM -0700, Cesar Philippidis wrote: >>> Another thing is what Jason as C++ maintainer wants, it is nice to get rid >>> of some code redundancies, on the other side the fact that there is one

Re: more accurate omp in fortran

2015-10-31 Thread Cesar Philippidis
built gcc with --enable-bootstrap. I've applied this patch to trunk, since it should have been included with the original patch in the first place. Cesar 2015-10-31 Cesar Philippidis PR Bootstrap/68168 gcc/fortran/ * openmp.c (resolve_omp_clauses): Pass &n->where when callin

  1   2   3   4   5   6   7   >