[openacc] add warnings for unused parallelism

2016-11-03 Thread Cesar Philippidis
cross a specific axis. Is this patch OK for trunk? This patch was originally posted by Nathan here <https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00210.html>. Most of the changes in that patch are already in trunk. Cesar 2016-11-03 Cesar Philippidis Nathan Sidwell gcc/

Re: [gomp4] Un-parallelized OpenACC kernels constructs with nvptx offloading: "avoid offloading" (was: [PATCH] Add fopt-info-oacc)

2016-11-03 Thread Cesar Philippidis
t run slow. Cesar On 01/21/2016 01:54 PM, Thomas Schwinge wrote: > Hi! > > On Mon, 18 Jan 2016 18:26:49 +0100, Tom de Vries > wrote: >> This patch introduces an option fopt-info-oacc. >> >> When using the option like this with a kernels region in kernels-loop.c

[PATCH] error on missing LTO symbols

2016-07-01 Thread Cesar Philippidis
This patch was originally posted last year: <https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02076.html>. I was trying to avoid it for OpenACC, but making non-acc routine calls errors would complicate library functions. Cesar 2016-07-01 Cesar Philippidis gcc/ * lto-cgraph.c (input_overwri

[gomp4] backport fortran FE error handling changes

2016-07-01 Thread Cesar Philippidis
I've applied this patch to gomp-4_0-branch which backports the recent error handling changes I made to the fortran FE. The discussion for the original patch for trunk can be found in this thread <https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00474.html>. 2016-07-01 Cesar Philippidis

[PATCH] OpenACC routines in fortran modules

2016-07-01 Thread Cesar Philippidis
add acc routine support for intrinsic procedures. So I can drop that part of the patch if necessary. Cesar 2016-07-01 Cesar Philippidis gcc/fortran/ * gfortran.h (enum oacc_function): Define. (oacc_function_type): Declare. (symbol_attribute): Change the type of oacc_function from unsigned to a

Re: [committed] Fix OpenMP parsing of the specification part in functions (PR fortran/71704)

2016-07-08 Thread Cesar Philippidis
d and if we match it, it means we'd be about to return an OpenMP > executable statement, so instead return ST_GET_FCN_CHARACTERISTICS. > > Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk, > queued for 6.2 backport. > > Cesar, n

Re: [committed] Fix OpenMP parsing of the specification part in functions (PR fortran/71704)

2016-07-08 Thread Cesar Philippidis
On 07/08/2016 09:18 AM, Jakub Jelinek wrote: > On Fri, Jul 08, 2016 at 09:13:50AM -0700, Cesar Philippidis wrote: >> On 06/30/2016 10:47 AM, Jakub Jelinek wrote: >> >>> The Fortran parser apparently relies in functions that have still undecided >

Re: [committed] Fix OpenMP parsing of the specification part in functions (PR fortran/71704)

2016-07-08 Thread Cesar Philippidis
On 07/08/2016 09:31 AM, Jakub Jelinek wrote: > On Fri, Jul 08, 2016 at 09:19:01AM -0700, Cesar Philippidis wrote: >> 2016-07-08 Cesar Philippidis >> >> gcc/fortran/ >> * parse.c (matcha): Define. >> (decode_oacc_directive): Add spec_only local va

Re: [committed] Fix OpenMP parsing of the specification part in functions (PR fortran/71704)

2016-07-08 Thread Cesar Philippidis
On 07/08/2016 10:25 AM, Jakub Jelinek wrote: > On Fri, Jul 08, 2016 at 09:58:57AM -0700, Cesar Philippidis wrote: >>>> +#define matcha(keyword, subr, st) \ >>>> +do { \ >>>> +

[gomp4] backport fixes for PR71704

2016-07-12 Thread Cesar Philippidis
This patch contains both Jakub's OpenMP and my OpenACC fixes for PR71704. For reference, the discussion for the original patches can be found here <https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02084.html>. I'll apply this patch to gomp-4_0-branch shortly. Cesar 2016-07-12 C

[PATCH] Remove struct map from plugin-nvptx

2016-07-12 Thread Cesar Philippidis
the original patch <https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01658.html>. Is this OK for trunk? Cesar 2016-07-12 Cesar Philippidis James Norris libgomp/ * plugin/plugin-nvptx.c (struct map): Delete. (map_pop): Remove use of struct map. (map_push): Likewise. Remove async argument

Re: [PATCH] zero-length arrays in OpenACC

2016-07-14 Thread Cesar Philippidis
Ping, x2. Cesar On 06/01/2016 02:35 PM, Cesar Philippidis wrote: > This patch teaches c and c++ front ends and omp-low how to deal with > subarray involving GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} data > mappings. As the libgomp test case shows, it might be possible for a > subarray

[PATCH] Fix OpenACC vector_length parsing in fortran

2016-07-14 Thread Cesar Philippidis
The fortran FE is currently scanning for the vector clause before vector_length. That's a problem match_oacc_clause_gwv matches 'vector' without looking for whatever follows it. The correction I made here was to scan for vector_length before vector. Is this OK for trunk and gcc6?

Patch ping

2016-07-22 Thread Cesar Philippidis
-07/msg00043.html * Add support for OpenACC routine clauses in fortran modules. Also, allow the routine directive to be applied to intrinsic procedures. https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00063.html Thanks, Cesar

[gomp4] encode acc routine clauses inside fortran module files

2016-07-27 Thread Cesar Philippidis
. https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00043.html I've applied this patch gomp-4_0-branch. Cesar 2016-07-27 Cesar Philippidis gcc/fortran/ * gfortran.h (enum oacc_function): Define. (oacc_function_type): Declare. (symbol_attribute): Change the type of oacc_function from unsigne

Re: [PATCH] OpenACC routines in fortran modules

2016-07-28 Thread Cesar Philippidis
On 07/28/2016 02:55 AM, Tobias Burnus wrote: > Cesar Philippidis wrote: >> It turns out that the acc routine parallelism isn't being recorded in >> fortran .mod files. This is a problem because then the ME can't validate >> if a routine has compatible parallelism wi

[gomp4] Fix PR72741

2016-07-28 Thread Cesar Philippidis
7;d like to see my other fortran module patch go in first. In the meantime, I'll commit this patch to gomp-4_0-branch. Cesar 2016-07-28 Cesar Philippidis PR fortran/72741 gcc/fortran/ * openmp.c (gfc_oacc_routine_dims): Move gfc_error to gfc_match_oacc_routine. Return OACC_FU

Re: [Patch 4/5] OpenACC tile clause support, Fortran front-end parts

2016-11-29 Thread Cesar Philippidis
On 11/18/2016 03:24 AM, Jakub Jelinek wrote: > On Sat, Nov 12, 2016 at 08:51:00AM -0800, Cesar Philippidis wrote: >> On 11/11/2016 02:34 AM, Jakub Jelinek wrote: >>> On Thu, Nov 10, 2016 at 06:46:46PM +0800, Chung-Lin Tang wrote: >> >> And here's the patch. >

[PATCH] OpenACC executable directives

2016-12-02 Thread Cesar Philippidis
enter or exit data directive. Is this patch OK for trunk? Cesar

Re: [PATCH] OpenACC executable directives

2016-12-02 Thread Cesar Philippidis
On 12/02/2016 06:37 AM, Cesar Philippidis wrote: > This patch teaches the C and C++ FEs to expect ACC ENTER/EXIT DATA, ACC > UPDATE and ACC WAIT executable directives to be used inside compound > statements. This is to prevent situations such as > > if (needs_wait) >

[gomp4] fix implicit data clause linker error

2016-12-06 Thread Cesar Philippidis
global variable definitions aren't included inside the offloaded LTO partitions. I've applied this fix to gomp-4_0-branch. Cesar 2016-12-06 Cesar Philippidis gcc/ * gimplify.c (gimplify_adjust_omp_clauses_1): Link ACC new clauses with the old ones. gcc/testsuite/ * c-c++-commo

[PATCH] Fix PR78027

2016-12-08 Thread Cesar Philippidis
linker does report an error for nvptx targets, but not the host. With that in mind, this patch is still necessary for case 1. Is this OK for trunk? Cesar 2016-12-08 Cesar Philippidis PR fortran/78027 gcc/ * ipa-icf.c (sem_function::parse): Don't process functions with oacc decl attri

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/08/2016 04:37 PM, Jeff Law wrote: > On 12/08/2016 04:05 PM, Cesar Philippidis wrote: >> PR78027 was classified as a fortran bug, but the underlying problem >> turned out to be more generic. Basically, the IPA-ICF pass usually >> ignores functions with omp decl attribu

Re: [nvptx] propagating conditionals in worker-vector partitioned loops

2016-12-09 Thread Cesar Philippidis
Ping. On 10/26/2016 03:29 PM, Cesar Philippidis wrote: > Currently, the nvptx backend is only neutering the worker axis when > propagating variables used in conditional expressions across the worker > and vector axes. That's a problem with the worker-state spill and fill

OpenACC Patch Ping

2016-12-09 Thread Cesar Philippidis
Re: [PATCH] OpenACC routines -- fortran front end <https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02266.html> ACC TILE patch: Re: [Patch 4/5] OpenACC tile clause support, Fortran front-end parts <https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02961.html> Cesar

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
"omp *" > attributes doesn't seem to be documented anywhere -- I see no way to > understand > from looking at this code _why_ the check is there; is it due to issues with > "omp declare simd"? or something else?) That does seem a little strict. I was debating whether this would be valid for OpenACC or not. The tricky part with OpenACC is the launch geometry. But then again, we could always teach IPA-ICF how to check the function attributes for equality among ACC regions. Cesar

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/09/2016 07:49 AM, Alexander Monakov wrote: > On Fri, 9 Dec 2016, Cesar Philippidis wrote: >>> Normally all offloaded code has either "omp declare target" (most >>> functions) or >>> "omp target entrypoint" (only toplevel offloaded code)

Re: [PATCH] omp-low.c split

2016-12-13 Thread Cesar Philippidis
sferred to the accelerator one way or another, so I'm not sure yet how beneficial this optimization would end up being. To be clear, I'm not proposing any of these changes for gcc7. Any changes to the above will go to gomp-4_0-branch first, then we'll port them over to gcc8. What type of performance problems are you experiencing with HSA? Cesar

[patch] cleanup *finish_omp_clauses

2016-04-27 Thread Cesar Philippidis
special handling in *finish_omp_clauses in the near future, too, so rather than add an is_oacc argument, I introduced an enum c_omp_region_type, similar to the one in gimplify.c. Is this patch ok for trunk? I'll make use of C_ORT_ACC shortly in a follow up patch. Cesar 2016-04-27

Re: [patch] cleanup *finish_omp_clauses

2016-04-28 Thread Cesar Philippidis
On 04/28/2016 01:56 AM, Jakub Jelinek wrote: > On Wed, Apr 27, 2016 at 07:37:17PM -0700, Cesar Philippidis wrote: >> This patch replaces all of the bool argument to c_finish_omp_clauses and >> finish_omp_clauses in the c and c++ front ends, respectively. Right now >> there are

Re: [ping][patch] update handling of 'acc parallel loop' reductions for PR70626

2016-04-28 Thread Cesar Philippidis
Ping. Cesar On 04/15/2016 02:30 PM, Cesar Philippidis wrote: > This patch makes the c, c++ and fortran FEs duplicate the reduction > clauses in a combined 'acc parallel loop' directive when it splits that > directive into separate parallel and loop directives. So giv

Re: [patch] cleanup *finish_omp_clauses

2016-05-01 Thread Cesar Philippidis
s passing C_ORT_OMP instead of C_ORT_OMP_DECLARE_SIMD. I didn't look into this too deeply though. Is this patch OK for trunk? Cesar 2016-04-29 Cesar Philippidis gcc/c-family/ * c-common.h (enum c_omp_region_type): Define. gcc/c/ * c-parser.c (c_parser_oacc_all_clauses): Update call to c_finish_omp_

[gomp4] backport fix for PR69363

2016-05-09 Thread Cesar Philippidis
I've applied this patch to gomp-4_0-branch which backports some cilk changes in the c and c++ front ends to gomp-4_0-branch. These changes were necessary for my recent finish_omp_clauses patch, which I'll be committing next. Cesar 2016-05-09 Cesar Philippidis Backport trunk r235290

[gomp4] backport the *finish_omp_clauses changes

2016-05-09 Thread Cesar Philippidis
This patch backports the *finish_omp_clauses changes I made to the c and c++ front ends in trunk revision 235780. Like the cilk patch, there were enough changes in gomp-4_0-branch which prevented this patch from applying cleanly on that branch. I've applied this patch to gomp-4_0-branch.

[gomp4] backport fix for PR70626

2016-05-09 Thread Cesar Philippidis
-reduction.C is broken in gomp4, so I had to xfail it. Apparently, it exposed an async bug. My forthcoming patch which uses firstprivate pointers for subarrays should fix it. This patch has been committed to gomp-4_0-branch. Cesar 2016-05-09 Cesar Philippidis Backport trunk r235651: 20

[patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-10 Thread Cesar Philippidis
not that exhaustive though, but I did include a test case for OpenMP. It should be noted that I still need to update the behavior of subarray pointers in fortran. I'm just waiting until for the OpenMP 4.5 fortran changes to land in trunk first. Is this patch OK for trunk? Cesar 2016-05-10

inhibit the sincos optimization when the target has sin and cos instructions

2016-05-13 Thread Cesar Philippidis
incos pass to ignore sin, cos and cexpi instructions when the target can expand those calls. This yields a 6x speedup in 314.omriq from spec accel when running on Nvidia accelerators. Is this OK for trunk? Cesar 2016-05-13 Cesar Philippidis gcc/ * tree-ssa-math-opts.c (pass_cse_sincos::ex

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-17 Thread Cesar Philippidis
On 05/13/2016 01:13 PM, Andrew Pinski wrote: > On Fri, May 13, 2016 at 12:58 PM, Richard Biener > wrote: >> On May 13, 2016 9:18:57 PM GMT+02:00, Cesar Philippidis >> wrote: >>> The cse_sincos pass tries to optimize sequences such as >>> >>> sin (x)

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-17 Thread Cesar Philippidis
On 05/17/2016 02:22 PM, Andrew Pinski wrote: > On Tue, May 17, 2016 at 2:10 PM, Cesar Philippidis > wrote: >> On 05/13/2016 01:13 PM, Andrew Pinski wrote: >>> On Fri, May 13, 2016 at 12:58 PM, Richard Biener >>> wrote: >>>> On May 13, 2016 9:18:57 PM

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-18 Thread Cesar Philippidis
On 05/18/2016 05:29 AM, Nathan Sidwell wrote: > On 05/17/16 17:30, Cesar Philippidis wrote: >> On 05/17/2016 02:22 PM, Andrew Pinski wrote: >>>> gcc.sum >>>> Tests that now fail, but worked before: >>>> >>>> nvptx-none-run: gcc.c-torture/e

Re: inhibit the sincos optimization when the target has sin and cos instructions

2016-05-19 Thread Cesar Philippidis
On 05/19/2016 04:29 AM, Alexander Monakov wrote: > On Wed, 18 May 2016, Cesar Philippidis wrote: > Note that the documentation suggests using 'make_safe_from' to concisely > express conflict resolution: > >> diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvp

Re: [ping][patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-19 Thread Cesar Philippidis
Ping. Cesar On 05/10/2016 01:29 PM, Cesar Philippidis wrote: > Pointers are special in OpenACC. Depending on the context, they can > either be treated as a "scalar" or as special firstprivate pointer. This > is in contrast to OpenMP target pointers, which are always treate

[gomp4] backport the new sincos pattern

2016-05-23 Thread Cesar Philippidis
I've committed this patch to backport the new sincos pattern, which is enabled with -ffast-math, to gomp-4_0-branch. Cesar 2016-05-23 Cesar Philippidis gcc/ * config/nvptx/nvptx.md (sincossf3): New pattern. gcc/testsuite/ * gcc.target/nvptx/sincos.c: New test. diff --git a/gcc/c

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-23 Thread Cesar Philippidis
On 05/20/2016 02:42 AM, Jakub Jelinek wrote: > On Tue, May 10, 2016 at 01:29:50PM -0700, Cesar Philippidis wrote: >> @@ -5796,12 +5796,14 @@ tree >> finish_omp_clauses (tree clauses, enum c_omp_region_type ort) >> { >>bitmap_head generic_head, firstpri

[gomp4] non-acc loop reductions implicit copy bugfix

2015-08-14 Thread Cesar Philippidis
er to correct this behavior in the gimplifier later on if necessary. I'll apply this patch to gomp-4_0-branch shortly. Cesar 2015-08-14 Cesar Philippidis gcc/ * c/c-typeck.c (c_finish_omp_clauses): Permit variables to appear in both OpenACC data and reduction clauses. * cp/semantics

[gomp4] New reduction infrastructure for OpenACC

2015-08-19 Thread Cesar Philippidis
for the existing OpenMP reductions. Rather, OpenMP will continue to use lower_reduction_clauses and friends, while OpenACC will use this infrastructure. That said, OpenMP could taught to use this infrastructure. Is this patch OK for gomp-4_0-branch? Thanks, Cesar 2015-08-19 Cesar Philippidis g

[gomp4] nvptx reductions

2015-08-21 Thread Cesar Philippidis
ch after the infrastructure patch goes in? Cesar 2015-08-20 Cesar Philippidis gcc/ * config/nvptx/nvptx.c (enum nvptx_builtins): New enum. (NVPTX_BUILTIN_MAX): Delete. (nvptx_get_worker_red_addr_fn): New function. (nvptx_generate_vector_shuffle): New function. (nvptx_shuffle_reduction): Ne

[gomp4] don't use VLA's in the reduction tests

2015-08-21 Thread Cesar Philippidis
Nathan noticed that I was using VLA's in the a couple of compile-time reduction tests. That's bad because ptx doesn't have support alloca. I guess these tests used to pass because we were only running them on the host. I'll apply this patch shortly. Cesar 2015-08-21 Cesar

[gomp4] lowering OpenACC reductions

2015-08-21 Thread Cesar Philippidis
es concern me about this change is that par-loops will need to become aware of that in insert those calls as necessary. Technically, it should be ok for now because par-loops doesn't support workers and vectors yet. But if we go with this change, par-loops will need to be updated event

[gomp4] firstprivate bug in combined acc loops

2015-08-24 Thread Cesar Philippidis
h has been committed to gomp-4_0-branch. Cesar 2015-08-24 Cesar Philippidis gcc/c-family * c-omp.c (c_oacc_split_loop_clauses): Don't propagate OMP_CLAUSE_FIRSTPRIVATE to acc loops with splitting the clauses. diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c index e9df829..79817

[gomp4] bug fix for num_gangs inside fortran subroutines

2015-08-24 Thread Cesar Philippidis
This patch adds support for num_gangs, num_workers and vector_length inside nested functions. This fixes an ICE that I hit inside a nested fortran subroutine that was using a num_gangs clause on an acc parallel construct. I applied this patch to gomp-4_0-branch. Cesar

[gomp4] teach the tracer pass to ignore more blocks for OpenACC

2015-08-26 Thread Cesar Philippidis
nicely with const_basic_block. Is this patch ok for gomp-4_0-branch? Cesar 2015-08-25 Cesar Philippidis gcc/ * tracer.c (ignore_bb_p): Change bb argument from const_basic_block to basic_block. Check for non-clonable calls to internal functions. diff --git a/gcc/tracer.c b/gcc/tracer.c

Re: [gomp4] lowering OpenACC reductions

2015-08-26 Thread Cesar Philippidis
On 08/21/2015 02:00 PM, Cesar Philippidis wrote: > This patch teaches omplower how to utilize the new OpenACC reduction > framework described in Nathan's document, which was posted here > <https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01248.html>. Here is the > infras

[gomp4] initialize worker reduction locks

2015-08-26 Thread Cesar Philippidis
e internal function used in the patch a couple of days ago. I've applied this patch to gomp-4_0-branch. Cesar 2015-08-26 Cesar Philippidis gcc/ * omp-low.c (lower_oacc_reductions): Call GOACC_REDUCTION_INIT to initialize the gang and worker mutex. diff --git a/gcc/omp-low.c b/gcc/omp-low.

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

2015-08-26 Thread Cesar Philippidis
to do here? Cesar 2015-08-26 Cesar Philippidis gcc/ * builtins.c (expand_oacc_ganglocal_ptr): Delete. (expand_builtin): Remove stale GOACC_GET_GANGLOCAL_PTR builtin. * config/nvptx/nvptx.md (ganglocal_ptr): Delete. * gimple.h (struct gimple_statement_omp_parallel_layout): Remove gang

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

2015-08-27 Thread Cesar Philippidis
On 08/27/2015 06:13 AM, Nathan Sidwell wrote: > On 08/26/15 21:37, Cesar Philippidis wrote: >> This patch strips out all of the references to ganglocal memory in gcc. >> Unfortunately, the runtime api still takes a shared memory parameter, so >> I haven't made any cha

[gomp4] check for compatible parallelism with acc routines

2015-08-28 Thread Cesar Philippidis
itting both of these loops. I.e., only the seq loop itself is executing in a non-partitioned mode. Julian inquired about this in the openacc technical list a while ago, but I don't think he got a response. This patch has been applied to gomp-4_0-branch. Cesar 2015-08-28 Cesar Philippi

[gomp4] useless reduction locks and other bug fixes

2015-09-01 Thread Cesar Philippidis
clude them with my upcoming auto-independent loop patch. This patch has been committed to gomp-4_0-branch. Cesar

Re: [gomp4] useless reduction locks and other bug fixes

2015-09-01 Thread Cesar Philippidis
[Attaching patch this time.] On 09/01/2015 04:21 PM, Cesar Philippidis wrote: > This patch teaches lower_oacc_reductions not to generate calls to > GOACC_{UN}LOCK if they aren't any reductions. That situation can happen > when there is a fake gang reduction on a private variabl

[gomp4] remove xfails in the libgomp reduction tests

2015-09-02 Thread Cesar Philippidis
that bug and removes the xfails from the reduction test cases. This patch has been committed to gomp-4_0-branch. Cesar 2015-09-02 Cesar Philippidis libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: Remove xfail. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv

[gomp4] force global locks for nvptx targets

2015-09-08 Thread Cesar Philippidis
t for the time being, global locks appear to work albeit with a lock contention penalty. I've applied this patch to gomp-4_0-branch. Cesar 2015-09-08 Cesar Philippidis gcc/ * config/nvptx/nvptx.c (force_global_lock): New global variable. (nvptx_expand_oacc_lock): Use it to workaroun

[gomp4] assign unused gwv clauses to auto/independent parallel acc loops

2015-09-09 Thread Cesar Philippidis
ation gets resolved? Cesar 2015-09-09 Cesar Philippidis gcc/ * omp-low.c (struct oacc_gwv): New struct. (filter_omp_clause): New function. (set_oacc_parallel_loop_gwv_1): New function. (set_oacc_parallel_loop_gwv): New function. (scan_omp_for): Use filer_omp_clause to remove the stale

[gomp4] parallel reduction nested inside data regions

2015-09-11 Thread Cesar Philippidis
gomp-4_0-branch. Cesar 2015-09-11 Cesar Philippidis gcc/ * omp-low.c (build_outer_var_ref): gcc/testsuite/ * c-c++-common/goacc/parallel-reduction.c: Enclose the parallel reduction inside an acc data region. libgomp/ * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: Enclose

[gomp4] backport nvptx_exec cleanups

2016-11-07 Thread Cesar Philippidis
I've applied this patch to gomp-4_0-branch. Cesar 2016-11-07 Cesar Philippidis libgomp/ Backport from trunk 2016-11-02 Cesar Philippidis Nathan Sidwell * plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes to determine default geometry. diff --git a/libgomp/pl

[gomp4] remove GOVD_USE_DEVPTR

2016-11-07 Thread Cesar Philippidis
this patch remove GOVD_USE_DEVPTR from gomp4. Cesar 2016-11-07 Cesar Philippidis gcc/fortran/ * openmp.c (gfc_match_omp_map_clause): New common_block argument. Propagate it to gfc_match_omp_variable_list. (gfc_match_omp_clauses): Update calls to gfc_match_omp_map_clause. gcc/ *

[openacc] add support for common block data

2016-11-07 Thread Cesar Philippidis
n block as a whole. This patch has been in gomp-4_0-branch for over a month, you can find the original patch here <https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00950.html>. Is this patch ok for trunk? Cesar 2016-11-07 Cesar Philippidis gcc/fortran/ * openmp.c (gfc_match_omp_

[gomp4] add support for derived types in ACC UPDATE

2016-11-10 Thread Cesar Philippidis
o let ACC UPDATE support non-contiguous subarrays, but it already is an oddball with its lone support for derived types. This patch has been committed to gomp-4_0-branch. Cesar 2016-11-10 Cesar Philippidis gcc/fortran/ * openmp.c (gfc_match_omp_variable_list): New allow_derived arg

[gomp4] remove OMP_CLAUSE_DEVICE_RESIDENT

2016-11-10 Thread Cesar Philippidis
I've committed this patch to gomp-4_0-branch which removes OMP_CLAUSE_DEVICE_RESIDENT. This standalone clause is no longer necessary, and hasn't been for a while, because device_resident is treated as a data mapping type for OMP_CLAUSE_MAP, and not a clause itself. Cesar 2016-11

[PATCH] OpenACC routines -- middle end

2016-11-11 Thread Cesar Philippidis
and gimplification code for diagnostics and code generation. I've also included the changes to c-family, because I wanted to break out the FE changes into separate patches. Is this patch OK for trunk? Cesar 2016-11-11 Cesar Philippidis Thomas Schwinge gcc/c-family/ * c-attr

[PATCH] OpenACC routines -- c++ front end

2016-11-11 Thread Cesar Philippidis
this patch OK for trunk? Cesar

[PATCH] OpenACC routines -- c front end

2016-11-11 Thread Cesar Philippidis
? Cesar 2016-11-11 Cesar Philippidis Thomas Schwinge gcc/c/ * c-parser.c (c_parser_omp_clause_name): Handle OpenACC bind and nohost. (c_parser_oacc_shape_clause): New location_t loc argument. Use it to report more accurate diagnostics. (c_parser_oacc_simple_clause): Likewise

[PATCH] OpenACC routines -- fortran front end

2016-11-11 Thread Cesar Philippidis
closely related. Last time I posted the module patch someone raised the concern that this change would break backwards compatibility. Considering this patch is for GCC 7, perhaps the module version number can be bumped to address that problem. Is this patch ok for trunk? Cesar 2016-11-11 Cesar

[PATCH] OpenACC routines -- test cases

2016-11-11 Thread Cesar Philippidis
This patch contains new and adjusted, runtime and compiler test cases for the new OpenACC routine functionality. Is this ok for trunk? Cesar 2016-11-11 Cesar Philippidis Thomas Schwinge gcc/testsuite/ * c-c++-common/goacc/routine-1.c: Add more coverage. * c-c++-common/goacc

Re: [Patch 4/5] OpenACC tile clause support, Fortran front-end parts

2016-11-12 Thread Cesar Philippidis
On 11/11/2016 02:34 AM, Jakub Jelinek wrote: > On Thu, Nov 10, 2016 at 06:46:46PM +0800, Chung-Lin Tang wrote: And here's the patch. Cesar >> 2016-XX-XX Cesar Philippidis >> >> fortran/ >> * openmp.c (resolve_oacc_positive_int_expr): Promote

[gomp4] backport various runtime changes

2016-11-16 Thread Cesar Philippidis
/ml/gcc-patches/2016-03/msg01149.html Usually these would have been imported to gomp4 as part of the regular trunk merges, but around that time we decided to make gomp4 track gcc6 not trunk. Consequently these patches fell through the cracks. I've applied these patch to gomp4. Cesar 2016-

[gomp4] remove use of CUDA unified memory in libgomp

2016-11-18 Thread Cesar Philippidis
the cuda_maps, but that can be optimized with a different data structure later. I've applied this patch to gomp-4_0-branch. Cesar 2016-11-18 Cesar Philippidis libgomp/ * plugin/plugin-nvptx.c (struct cuda_map): New. (struct ptx_stream): Replace d, h, h_begin, h_end, h_next, h_

Re: [PATCH] OpenACC routines -- middle end

2016-11-22 Thread Cesar Philippidis
On 11/18/2016 04:14 AM, Jakub Jelinek wrote: > On Fri, Nov 11, 2016 at 03:43:02PM -0800, Cesar Philippidis wrote: >> +error_at (OMP_CLAUSE_LOCATION (c), >> + "%qs specifies a conflicting level of parallelism", >> + omp_clau

Re: [PATCH] OpenACC routines -- c front end

2016-11-22 Thread Cesar Philippidis
On 11/18/2016 04:21 AM, Jakub Jelinek wrote: > On Fri, Nov 11, 2016 at 03:43:23PM -0800, Cesar Philippidis wrote: >> @@ -11801,12 +11807,11 @@ c_parser_oacc_shape_clause (c_parser *parser, >> omp_clause_code kind, >> } >> >>location_t expr_

Re: [PATCH] OpenACC routines -- fortran front end

2016-11-22 Thread Cesar Philippidis
On 11/18/2016 04:29 AM, Jakub Jelinek wrote: > On Fri, Nov 11, 2016 at 03:44:07PM -0800, Cesar Philippidis wrote: >> --- a/gcc/fortran/gfortran.h >> +++ b/gcc/fortran/gfortran.h >> @@ -314,6 +314,15 @@ enum save_state >> { SAVE_NONE = 0, SAVE_EXPLICIT, SAVE_IMPLICIT

Re: [PATCH] OpenACC routines -- middle end

2016-11-22 Thread Cesar Philippidis
On 11/22/2016 11:58 AM, Jakub Jelinek wrote: > On Tue, Nov 22, 2016 at 11:53:50AM -0800, Cesar Philippidis wrote: >> I've incorporated those changes in this patch. Is it ok for trunk? > > The ChangeLog mentions omp-low.[ch] changes, but the patch doesn't include > th

Re: [PATCH] OpenACC routines -- c++ front end

2016-11-22 Thread Cesar Philippidis
On 11/11/2016 03:43 PM, Cesar Philippidis wrote: > Like it's c FE counterpart, this contains the following changes: > > * Updates c_parser_oacc_shape_clause to accept a location_t >argument in order to make the diagnostics more precise. > > * Adds support for the

Re: [gomp4] [WIP] OpenACC bind, nohost clauses

2015-12-14 Thread Cesar Philippidis
the > implementation, focussing on C. See also my question "How to rewrite > call targets (OpenACC bind clause)", > <http://news.gmane.org/find-root.php?message_id=%3C877fkq482i.fsf%40hertz.schwinge.homeip.net%3E>. > > To enable Cesar to help with the C++ and Fortra

Re: [gomp4] [WIP] OpenACC bind, nohost clauses

2015-12-16 Thread Cesar Philippidis
On 12/14/2015 12:36 PM, Cesar Philippidis wrote: > On 12/08/2015 11:55 AM, Thomas Schwinge wrote: >> On Sat, 14 Nov 2015 09:36:36 +0100, I wrote: >> C front end: >> >> --- gcc/c/c-parser.c >> +++ gcc/c/c-parser.c >> @@ -11607,6 +11607,8 @@ c_par

Re: [gomp4] kernels offload fns

2016-01-06 Thread Cesar Philippidis
> + int level = oacc_fn_attrib_level (attrs); dims is dead and that's causing a bootstrap failure. I've applied this patch to gomp-4_0-branch to fix it. Cesar 2016-01-06 Cesar Philippidis gcc/ * omp-low.c (new_oacc_loop_routine): Remove stale dims variable. diff --git a/gcc/omp

[gomp4] private reductions

2016-01-06 Thread Cesar Philippidis
g++.sum:c-c++-common/goacc/routine-7.c libgomp.oacc-c/../libgomp.oacc-c-c++-common/declare-4.c I'll work on routine-7.c tomorrow. Jim, can you look at the declare-4.c failure? This patch has been applied to gomp-4_0-branch. Cesar 2016-01-06 Cesar Philippidis

[gomp4] reductions on explicitly private variables

2016-01-07 Thread Cesar Philippidis
t; 100; i++) v++; red[j] = v; } } This used to case a problem in lower_oacc_reductions because the reduction finalizer wasn't updating the correct variable. The attached patch fixes it. I've applied this patch to gomp-4_0-branch. Cesar 2016-01-07 Cesar Phi

[gomp4] teach the lto driver to error for missing decls

2016-01-08 Thread Cesar Philippidis
In openacc there are situations where a user may fail to mark a variable or function as offloadable (either using declare or routine). This patch makes the lto wrapper reduce the missing decl assertion to an error. I've applied this patch to gomp-4_0-branch. Cesar 2016-01-08 Cesar Philip

Re: [gomp4] private reductions

2016-01-08 Thread Cesar Philippidis
On 01/06/2016 07:55 PM, Cesar Philippidis wrote: > @@ -1384,26 +1331,9 @@ build_outer_var_ref (tree var, omp_context *ctx, bool > lastprivate = false) > x = build_simple_mem_ref (x); > } > } > - else if (is_oacc_parallel (ctx)) > -x = var; >

Re: [gomp4] private reductions

2016-01-11 Thread Cesar Philippidis
On 01/11/2016 04:10 AM, Thomas Schwinge wrote: > On Wed, 6 Jan 2016 19:55:02 -0800, Cesar Philippidis > wrote: >> This patch updates the way that private reductions are handled in gomp4 >> to be more like trunk. > > Anything to commit to trunk (test cases at least?)?

Re: [gomp4] teach the lto driver to error for missing decls

2016-01-11 Thread Cesar Philippidis
On 01/11/2016 07:34 AM, Bernd Schmidt wrote: > On 01/08/2016 11:37 PM, Cesar Philippidis wrote: >> In openacc there are situations where a user may fail to mark a variable >> or function as offloadable (either using declare or routine). This patch >> makes the lto wrapper re

[gomp4] arrays inside modules

2016-01-12 Thread Cesar Philippidis
n gomp4 in an attempt to move all of the non-array descriptor array variables into the offloaded region. Applications, such as cloverleaf, sometimes have a lot of small offloaded regions, and treating those supplementary array variables as firstprivate caused a measurable I/O overhead. Cesar 2015

[openacc] implicit non-scalars data mapping in kernels

2016-01-13 Thread Cesar Philippidis
ticed that there was already code in place to handle pointer types for parallel data mappings, so in this patch I moved that type extraction earlier so that both kernels and parallel regions can use it. Is this patch ok for trunk? Thanks, Cesar 2016-01-13 Cesar Philippidis gcc/ *

Re: [openacc] implicit non-scalars data mapping in kernels

2016-01-13 Thread Cesar Philippidis
On 01/13/2016 02:35 PM, Marek Polacek wrote: > On Wed, Jan 13, 2016 at 02:29:21PM -0800, Cesar Philippidis wrote: >> --- a/gcc/gimplify.c >> +++ b/gcc/gimplify.c >> @@ -5994,6 +5994,11 @@ oacc_default_clause (struct gimplify_omp_ctx *ctx, >> tree decl, unsigned fl

Re: [openacc] implicit non-scalars data mapping in kernels

2016-01-14 Thread Cesar Philippidis
On 01/14/2016 06:18 AM, Nathan Sidwell wrote: > On 01/13/16 17:44, Jakub Jelinek wrote: >> On Wed, Jan 13, 2016 at 11:35:08PM +0100, Marek Polacek wrote: >>> On Wed, Jan 13, 2016 at 02:29:21PM -0800, Cesar Philippidis wrote: >>>> --- a/gcc/gimplify.c >>>

[gomp4] implicit non-scalars data mapping in kernels backport

2016-01-15 Thread Cesar Philippidis
-patches/2016-01/msg00873.html>. Cesar 2016-01-15 Cesar Philippidis gcc/ * gimplify.c (oacc_default_clause): Decode reference and pointer types for both kernels and parallel regions. libgomp/ * testsuite/libgomp.oacc-fortran/kernels-data.f90: New test. diff --git a/gcc/gimpl

[PATCH] libgomp testsuite fixes

2013-05-30 Thread Cesar Philippidis
-fuse-linker-plugin}}" does not exist. This problem usually does not occur since the default site.exp does not contain ENABLE_LTO=1. I tested both with and without our custom site.exp. Is it OK for trunk? If so, please check it in since I do not have commit rights. Cesar Philippidis 2013-0

[PATCH] libitm testsuite fixes

2013-05-30 Thread Cesar Philippidis
lugin}}" does not exist. This problem usually does not occur since the default site.exp does not contain ENABLE_LTO=1. This patch has been tested both with and without our custom site.exp. Is this OK for trunk? If so, please check it in since I do not have commit rights. Cesar Philippidis 2013-0

[PATCH] libffi documentation fix

2013-06-03 Thread Cesar Philippidis
This patch from libffi revision 675c9839224 allows libffi.pdf to be generated without tex related errors. I tested it on gcc trunk. Please backport it to gcc. The original patch can be found here: http://sourceware.org/ml/libffi-discuss/2013/msg00086.html Cesar 2013-06-03 Andreas Schwab

[PATCH] ARMv6-M MI thunk fix

2013-06-06 Thread Cesar Philippidis
multiple inheritance, and that triggered the problem. I tested this patch with the default ARM and THUMB multilibs in additional to -march=armv6-m. OK for trunk? Cesar 2013-06-06 Julian Brown Cesar Philippidis gcc/ * config/arm/arm.c (arm_output_mi_thunk): Fix

Re: [PATCH] ARMv6-M MI thunk fix

2013-06-07 Thread Cesar Philippidis
argets. Is the new comment OK? If so, please check it in since I do not have SVN write access. Thanks, Cesar 2013-06-07 Julian Brown Cesar Philippidis gcc/ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for TARGET_THUMB1_ONLY. Index: gcc/confi

<    1   2   3   4   5   6   7   >