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

2018-07-02 Thread Tom de Vries
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 "CUDA Occupancy Calculator" spreadsheet that's distrib

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-03 Thread Tom de Vries
On 07/02/2018 10:16 AM, Jakub Jelinek wrote: > On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: >> Given the array has size i + 1 it's upper bound should be 'i' and 'i' >> should be available via DW_OP_[GNU_]entry_value. >> >> I see it is >> >> <175> DW_AT_upper_bound : 10 byte

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-04 Thread Tom de Vries
On 07/03/2018 11:05 AM, Tom de Vries wrote: > On 07/02/2018 10:16 AM, Jakub Jelinek wrote: >> On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: >>> Given the array has size i + 1 it's upper bound should be 'i' and 'i' >>> should be

[testsuite] Simplify dg-final

2018-07-05 Thread Tom de Vries
[ was: [PATCH, testsuite/guality] Use line number vars in gdb-test ] On Wed, Jul 04, 2018 at 08:32:49PM +0100, Richard Sandiford wrote: > Tom de Vries writes: > > +proc dg-final { args } { > > +upvar dg-final-code final-code > > + > > +if { [llength $args] >

[PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-05 Thread Tom de Vries
[ was: Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c ] On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: > On 07/03/2018 11:05 AM, Tom de Vries wrote: > > On 07/02/2018 10:16 AM, Jakub Jelinek wrote: > >> On Mon, Jul 02, 2018 at 09:44:0

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-05 Thread Tom de Vries
On 07/05/2018 01:39 PM, Richard Biener wrote: > On Thu, Jul 5, 2018 at 1:25 PM Tom de Vries wrote: >> >> [ was: Re: [testsuite/guality, committed] Prevent optimization of local in >> vla-1.c ] >> >> On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: &

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-06 Thread Tom de Vries
On 07/05/2018 01:39 PM, Richard Biener wrote: > On Thu, Jul 5, 2018 at 1:25 PM Tom de Vries wrote: >> >> [ was: Re: [testsuite/guality, committed] Prevent optimization of local in >> vla-1.c ] >> >> On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: &

[PATCH] Fix sigsegv on -fdump-tree-all-enumerate_locals

2018-07-06 Thread Tom de Vries
Hi, this patch fixes a sigsegv when using -fdump-tree-all-enumerate_locals, by handling cfun->cfg == NULL conservatively in dump_enumerated_decls. OK for trunk? Thanks, - Tom Fix sigsegv on -fdump-tree-all-enumerate_locals 2018-07-06 Tom de Vries * tree-df

[PATCH][debug] Handle debug references to skipped params

2018-07-08 Thread Tom de Vries
On Fri, Jul 06, 2018 at 04:38:50PM +0200, Richard Biener wrote: > On Fri, Jul 6, 2018 at 12:47 PM Tom de Vries wrote: > > On 07/05/2018 01:39 PM, Richard Biener wrote: > I now also spotted the code in remap_ssa_name that is supposed to handle > this it seems and for the testca

[PATCH][debug] Reuse debug exprs generated in remap_ssa_name

2018-07-08 Thread Tom de Vries
On Sun, Jul 08, 2018 at 11:22:41AM +0200, Tom de Vries wrote: > On Fri, Jul 06, 2018 at 04:38:50PM +0200, Richard Biener wrote: > > On Fri, Jul 6, 2018 at 12:47 PM Tom de Vries wrote: > > > On 07/05/2018 01:39 PM, Richard Biener wrote: > > > > > I now also s

[testsuite, committed] Use relative line numbers in gcc.dg/guality

2018-07-09 Thread Tom de Vries
Hi, this patches uses relative line numbers in gcc.dg/guality where obvious: either the relative line number is '.', '.-1' or '.+1', or adjacent to another obvious case. Committed as obvious. Thanks, - Tom [testsuite] Use relative line numbers in gcc.dg/gua

[PATCH][testsuite, guality] Add -fno-ipa-icf in gcc.dg/guality

2018-07-13 Thread Tom de Vries
c.dg/guality/sra-1.c ... line .+1 a[0] == 4 -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14 +PASS:gcc.dg/guality/sra-1.c ... line . a[1] == 14 ... Tested on x86_64. OK for trunk? Thanks, - Tom [testsuite, guality] Add -fno-ipa-icf in gcc.dg/guality 2018-07-13 Tom de Vries

Re: [PATCH][debug] Reuse debug exprs generated in remap_ssa_name

2018-07-13 Thread Tom de Vries
On 07/09/2018 02:43 PM, Richard Biener wrote: > On Sun, Jul 8, 2018 at 11:27 AM Tom de Vries wrote: >> >> On Sun, Jul 08, 2018 at 11:22:41AM +0200, Tom de Vries wrote: >>> On Fri, Jul 06, 2018 at 04:38:50PM +0200, Richard Biener wrote: >>>> On Fri, Jul 6,

[PATCH][testsuite/guality] Run guality tests with Og

2018-07-13 Thread Tom de Vries
during testing? Thanks, - Tom [testsuite/guality] Run guality tests with Og 2018-07-13 Tom de Vries * lib/gcc-gdb-test.exp (guality_minimal_options): New proc. * g++.dg/guality/guality.exp: Ensure Og is part of torture options. * gcc.dg/guality/guality.exp: Same

Re: [PATCH][testsuite/guality] Run guality tests with Og

2018-07-15 Thread Tom de Vries
On Fri, Jul 13, 2018 at 01:27:25PM +0200, Richard Biener wrote: > On Fri, 13 Jul 2018, Tom de Vries wrote: > > > Hi, > > > > we advertise Og as the optimization level of choice for the standard > > edit-compile-debug cycle, but do not run the guality tests for O

[PATCH][debug] Fix pre_dec handling in vartrack

2018-07-15 Thread Tom de Vries
ze. Also, the patch prints the adjusted insn in a slim way if dump_flags contain TDF_SLIM, which makes the scan-rtl-dump in the testcase easier. Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom [debug] Fix pre_dec handling in vartrack 2018-07-15 Tom de Vries * var

[RFC][debug] Add -fadd-debug-nops

2018-07-16 Thread Tom de Vries
Hi, this is an idea that I'm currently playing around with: adding nops in an optimized application with debug info can improve the debug info. Consider f.i. this gdb session in foo of pr54200-2.c (using -Os): ... (gdb) n 26return a; /* { dg-final { gdb-test . "(int)a" "6" } } */ (gd

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-16 Thread Tom de Vries
On 07/16/2018 03:34 PM, Jakub Jelinek wrote: > On Mon, Jul 16, 2018 at 03:29:10PM +0200, Tom de Vries wrote: >> this is an idea that I'm currently playing around with: adding nops in >> an optimized application with debug info can improve the debug info. >> >> Consi

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-16 Thread Tom de Vries
On 07/16/2018 03:50 PM, Richard Biener wrote: > On Mon, 16 Jul 2018, Tom de Vries wrote: > >> Hi, >> >> this is an idea that I'm currently playing around with: adding nops in >> an optimized application with debug info can improve the debug info. >> >&

Re: [PATCH, PR86257, i386/debug] Fix insn prefix in tls_global_dynamic_64_

2018-07-17 Thread Tom de Vries
On 06/25/2018 03:02 PM, Tom de Vries wrote: > On 06/25/2018 02:45 PM, Nathan Sidwell wrote: >> On 06/25/2018 08:25 AM, Tom de Vries wrote: >> >>> If we'd implemented something like this in gas: >>> ... >>> .insn >>> .byte 0x66 >

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-18 Thread Tom de Vries
On 07/06/2018 12:28 PM, Richard Biener wrote: > On Thu, Jul 5, 2018 at 4:12 PM Tom de Vries wrote: >> >> On 07/05/2018 01:39 PM, Richard Biener wrote: >>> On Thu, Jul 5, 2018 at 1:25 PM Tom de Vries wrote: >>>> >>>> [ was: Re: [testsuite/gual

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Tom de Vries
On 07/19/2018 10:30 AM, Richard Biener wrote: > On Wed, Jul 18, 2018 at 3:42 PM Tom de Vries wrote: >> >> On 07/06/2018 12:28 PM, Richard Biener wrote: >>> On Thu, Jul 5, 2018 at 4:12 PM Tom de Vries wrote: >>>> >>>> On 07/05/2018 01:39 PM, Richard

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-24 Thread Tom de Vries
On 07/16/2018 05:10 PM, Tom de Vries wrote: > On 07/16/2018 03:50 PM, Richard Biener wrote: >> On Mon, 16 Jul 2018, Tom de Vries wrote: >>> Any comments? >> >> Interesting idea. I wonder if that should be generalized >> to other places > > I kept

[RFC 1/3, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesti

[RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesti

[RFC 3/3, debug] Add fdebug-nops and fkeep-vars-live to Og only

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > On 07/16/2018 03:50 PM, Richard Biener wrote: > >> On Mon, 16 Jul 2018, Tom de Vries wrote: > >>> Any comments? > >> > >> Interesti

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: >> Another drawback is that the fake uses confuse the unitialized warning >> analysis, so that is switched off for -fkeep-vars-live. > > Is that really needed? I

[PATCH, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 01:35:14PM +0200, Tom de Vries wrote: > On Tue, Jul 24, 2018 at 01:30:30PM +0200, Tom de Vries wrote: > > On 07/16/2018 05:10 PM, Tom de Vries wrote: > > > On 07/16/2018 03:50 PM, Richard Biener wrote: > > >> On Mon, 16 Jul 2018, Tom de Vri

[PATCH, debug] Add fkeep-vars-live

2018-07-24 Thread Tom de Vries
On Tue, Jul 24, 2018 at 02:34:26PM +0200, Tom de Vries wrote: > On 07/24/2018 01:46 PM, Jakub Jelinek wrote: > > On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > >> Another drawback is that the fake uses confuse the unitialized warning > >> analysis,

Re: [RFC 1/3, debug] Add fdebug-nops

2018-07-24 Thread Tom de Vries
On 07/24/2018 09:06 PM, Alexandre Oliva wrote: > On Jul 24, 2018, Tom de Vries wrote: > >> There's a design principle in GCC that code generation and debug generation >> are independent. This guarantees that if you're encountering a problem in an >> appli

[committed, libgomp, openacc, testsuite] Fix async/wait logic in lib-13.f90

2018-07-26 Thread Tom de Vries
ed on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [libgomp, openacc, testsuite] Fix async/wait logic in lib-13.f90 2018-07-26 Tom de Vries * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with acc_wait. Move acc_async_test calls to co

[committed, libgomp, openacc, testsuite] Fix async logic in lib-12.f90

2018-07-26 Thread Tom de Vries
ed on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [libgomp, openacc, testsuite] Fix async logic in lib-12.f90 2018-07-26 Tom de Vries * testsuite/libgomp.oacc-fortran/lib-12.f90: Move acc_async_test calls to correct locations. Remove xfail. --- li

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

2018-07-26 Thread Tom de Vries
> Content-Type: text/x-patch; name="trunk-libgomp-default-par.diff" > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; filename="trunk-libgomp-default-par.diff" >From https://gcc.gnu.org/contribute.html#patches : ... We prefer patches posted as plain text or as MIME parts of type

[libgomp, nvptx] Move device property sampling from nvptx_exec to nvptx_open

2018-07-26 Thread Tom de Vries
om [libgomp, nvptx] Move device property sampling from nvptx_exec to nvptx_open Move sampling of device properties from nvptx_exec to nvptx_open, and assume the sampling always succeeds. This simplifies the default dimension initialization code in nvptx_open. 2018-07-26 Cesar Philippidis

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

2018-07-26 Thread Tom de Vries
. Thanks, - Tom [libgomp, nvptx] Add error with recompilation hint for launch failure Currently, when a kernel is lauched with too many workers, it results in a cuda launch failure. This is triggered f.i. for parallel-loop-1.c at -O0 on a Quadro M1200. This patch detects this situation, and error

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

2018-07-26 Thread Tom de Vries
On 07/26/2018 04:27 PM, Cesar Philippidis wrote: > 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

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

2018-07-30 Thread Tom de Vries
On 07/11/2018 09:13 PM, Cesar Philippidis wrote: > 2018-07-XX Cesar Philippidis > Tom de Vries > > gcc/ > * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ... > (PTX_DEFAULT_RUNTIME_DIM): ... this. > (nvptx_goacc_validate_dims): S

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

2018-07-30 Thread Tom de Vries
introducing per-device default dimensions. 2018-07-27 Tom de Vries * plugin/plugin-nvptx.c (struct ptx_device): Add default_dims field. (nvptx_open_device): Init default_dims for device. (nvptx_exec): Use default_dims from device. --- libgomp/plugin/plugin-nvptx.c | 28

[libgomp, nvptx. committed] Handle per-function max-threads-per-block in default dims

2018-07-30 Thread Tom de Vries
resources available in the device, due to the default dimensions chosen by the runtime. This patch fixes that by taking the per-function max_threads_per_block into account when using the default dimensions. 2018-07-27 Tom de Vries * plugin/plugin-nvptx.c (MIN, MAX): Redefine. (nvptx_exec): Ensure

[PATCH][c++] Fix DECL_BY_REFERENCE of clone parms

2018-07-30 Thread Tom de Vries
()) is no longer true for the updated type of the parm, so DECL_BY_REFERENCE is not set there either. This patch fixes the problem by copying DECL_BY_REFERENCE in update_cloned_parm. Build and reg-tested on x86_64. OK for trunk? Thanks, - Tom [c++] Fix DECL_BY_REFERENCE of clone parms 2018-0

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

2018-08-01 Thread Tom de Vries
On 07/31/2018 04:58 PM, Cesar Philippidis wrote: > The attached patch teaches libgomp how to use the CUDA thread occupancy > calculator built into the CUDA driver. Despite both being based off the > CUDA thread occupancy spreadsheet distributed with CUDA, the built in > occupancy calculator differs

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

2018-08-01 Thread Tom de Vries
On 07/31/2018 05:12 PM, Cesar Philippidis wrote: > This is an old patch which removes the struct map from the nvptx plugin. > I believe at one point this was supposed to be used to manage async data > mappings, but in practice that never worked out. I don't quite understand what rationale you're t

Re: [PATCH] nvptx: properly use flag_patchable_function_entry

2021-02-10 Thread Tom de Vries
On 2/10/21 2:17 PM, Martin Liška wrote: > It's fix needed after my commit g:0d701e3eb89870237669ef7bf41394d90c35ae70. > Tobias tested the patch for me. > > Ready to be installed? LGTM. Thanks, - Tom > Thanks, > Martin > > gcc/ChangeLog: > > * config/nvptx/nvptx.c (nvptx_option_override):

Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB with SIMT LANE [PR95654]

2020-09-16 Thread Tom de Vries
[ cc-ing author omp support for nvptx. ] On 9/16/20 12:39 PM, Tobias Burnus wrote: > Hi Tom, hi Richard, hello all, > > @Richard: does it look okay from the ME side? > @Tom: Can you check which IFN_GOMP_SIMT should be > excluded with -ftracer? > > Pre-remark, I do not know much about SIMT – exce

Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB with SIMT LANE [PR95654]

2020-09-16 Thread Tom de Vries
ing collapse(2), remove mentions of > d2) and if so supply dumps from that instead, I'd appreciate that too. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95654#c8 Thanks, - Tom > Alexander > > On Wed, 16 Sep 2020, Tom de Vries wrote: > >> [ cc-ing author omp suppo

[committed][libgomp, nvptx] Print error log for link error

2020-09-22 Thread Tom de Vries
Hi, By running libgomp test-case libgomp.c/target-28.c with GOMP_NVPTX_PTXRW=w (using a maintenance patch that adds support for this env var), we dump the ptx in target-28.exe to file. By editing one ptx file to rename gomp_nvptx_main to gomp_nvptx_main2 in both declaration and call, and running

Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB with SIMT LANE [PR95654]

2020-09-22 Thread Tom de Vries
On 9/16/20 12:39 PM, Tobias Burnus wrote: > Hi Tom, hi Richard, hello all, > > @Richard: does it look okay from the ME side? > @Tom: Can you check which IFN_GOMP_SIMT should be > excluded with -ftracer? > > Pre-remark, I do not know much about SIMT – except that they > only appear with nvptx and

[PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-09-22 Thread Tom de Vries
[ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB with SIMT LANE [PR95654] ] On 9/16/20 8:20 PM, Alexander Monakov wrote: > > > On Wed, 16 Sep 2020, Tom de Vries wrote: > >> [ cc-ing author omp support for nvptx. ] > > The issue looks famil

[committed][testsuite] Add missing require-effective-target alloca

2020-09-23 Thread Tom de Vries
Hi, Add missing require-effect-target alloca directives. Tested on nvptx. Committed to trunk. Thanks, - Tom [testsuite] Add missing require-effective-target alloca gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-63.c: Add require-effective-target alloca. * gcc.dg/Warray-bound

[committed][nvptx] Handle move from DF subreg to DF reg in nvptx_output_mov_insn

2020-09-23 Thread Tom de Vries
Hi, When compiling test-case gcc.dg/atomic/c11-atomic-exec-1.c, we run into these ptxas errors: ... line 100; error: Rounding modifier required for instruction 'cvt' line 105; error: Rounding modifier required for instruction 'cvt' ... The problem is that this move: ... //(insn 13 11 14 2 //

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-09-23 Thread Tom de Vries
On 9/23/20 9:28 AM, Richard Biener wrote: > On Tue, 22 Sep 2020, Tom de Vries wrote: > >> [ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB >> with SIMT LANE [PR95654] ] >> >> On 9/16/20 8:20 PM, Alexander Monakov wrote: >>>

[committed][nvptx] Split up function ref plus const

2020-09-23 Thread Tom de Vries
Hi, With test-case gcc.c-torture/compile/pr92231.c, we run into: ... nvptx-as: ptxas terminated with signal 11 [Segmentation fault], core dumped^M compiler exited with status 1 FAIL: gcc.c-torture/compile/pr92231.c -O0 (test for excess errors) ... due to using a function reference plus constant

[committed][testsuite] Check target alias in builtin-has-attribute-3.c

2020-09-23 Thread Tom de Vries
Hi, When running test-case c-c++-common/builtin-has-attribute-3.c on nvptx, I get: ... FAIL: c-c++-common/builtin-has-attribute-3.c -Wc++-compat \ (test for excess errors) Excess errors: src/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c:33:33: error: \ alias definitions not supported i

Re: [RFC] Offloading and automatic linking of libraries

2020-09-23 Thread Tom de Vries
On 9/24/20 8:32 AM, Tobias Burnus wrote: > Hi all, > > we got the user comment that it is far from obvious to > use  -foffload=-latomic if the following error shows up: > > unresolved symbol __atomic_compare_exchange_16 > collect2: error: ld returned 1 exit status > mkoffload: fatal error: >

[committed][testsuite] Require non_strict_align in pr94600-{1,3}.c

2020-09-24 Thread Tom de Vries
record_mode. Fix the FAILs by requiring effective target non_strict_align. Tested on nvptx. Committed to trunk. Thanks, - Tom [testsuite] Require non_strict_align in pr94600-{1,3}.c gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * gcc.dg/pr94600-1.c: Require effective target non_stri

[PATCH][testsuite] Add effective target ident_directive

2020-09-24 Thread Tom de Vries
ed on nvptx and x86_64. OK for trunk? Thanks, - Tom [testsuite] Add effective target ident_directive gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * lib/target-supports.exp (check_effective_target_ident_directive): New proc. * c-c++-common/ident-1b.c: Require e

[committed][testsuite, nvptx] Fix string matching in gcc.dg/pr87314-1.c

2020-09-24 Thread Tom de Vries
this by adding an nvptx-specific scan-assembler directive. Tested on nvptx and x86_64. Committed to trunk. Thanks, - Tom [testsuite, nvptx] Fix string matching in gcc.dg/pr87314-1.c gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * gcc.dg/pr87314-1.c: Add nvptx-specific scan

[committed][testsuite] Scan final instead of asm in independent-cloneids-1.c

2020-09-24 Thread Tom de Vries
$0 ... Fix this by rewriting the scans to use the final dump instead. Tested on x86_64. Committed to trunk. Thanks, - Tom [testsuite] Scan final instead of asm in independent-cloneids-1.c gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * gcc.dg/independent-cloneids-1.c: Use scan

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-09-24 Thread Tom de Vries
On 9/24/20 1:42 PM, Richard Biener wrote: > On Wed, 23 Sep 2020, Tom de Vries wrote: > >> On 9/23/20 9:28 AM, Richard Biener wrote: >>> On Tue, 22 Sep 2020, Tom de Vries wrote: >>> >>>> [ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.

[committed][testsuite, nvptx] Fix gcc.dg/tls/thr-cse-1.c

2020-09-24 Thread Tom de Vries
gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * gcc.dg/tls/thr-cse-1.c: Scan final dump instead of assembly for nvptx. --- gcc/testsuite/gcc.dg/tls/thr-cse-1.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/tls/thr-cse-1.c b/gcc/test

[committed][testsuite] Add missing require-effective-target alloca

2020-09-25 Thread Tom de Vries
Hi, Add missing require-effect-target alloca directives. Tested on nvptx. Committed to trunk. Thanks, - Tom [testsuite] Add missing require-effective-target alloca gcc/testsuite/ChangeLog: 2020-09-25 Tom de Vries * gcc.dg/analyzer/pr93355-localealias.c: Require effective target

Re: [PATCH] add move CTOR to auto_vec, use auto_vec for get_loop_exit_edges

2020-09-25 Thread Tom de Vries
On 9/24/20 5:05 PM, Richard Biener wrote: > On Thu, 24 Sep 2020, Jonathan Wakely wrote: > >> On 24/09/20 11:11 +0200, Richard Biener wrote: >>> On Wed, 26 Aug 2020, Richard Biener wrote: >>> On Thu, 6 Aug 2020, Richard Biener wrote: > On Thu, 6 Aug 2020, Richard Biener wrote: > >

[committed][nvptx] Fix Wimplicit-fallthrough in nvptx.c with -save-temps

2020-09-25 Thread Tom de Vries
() in addition to the comment. Tested by building target nvptx, copying nvptx.c compile line and adding -save-temps. Committed to trunk. Thanks, - Tom [nvptx] Fix Wimplicit-fallthrough in nvptx.c with -save-temps gcc/ChangeLog: 2020-09-25 Tom de Vries * config/nvptx/nv

Re: [PATCH] amdgcn, nvptx: Disable OMP barriers in nested teams

2020-09-28 Thread Tom de Vries
On 9/18/20 1:25 PM, Andrew Stubbs wrote: > This patch fixes a problem in which nested OpenMP parallel regions cause > errors if the number of inner teams is not balanced (i.e. the number of > loop iterations is not divisible by the number of physical threads). A > testcase is included. > > On NVPT

Re: [PATCH] amdgcn, nvptx: Disable OMP barriers in nested teams

2020-09-28 Thread Tom de Vries
On 9/28/20 4:17 PM, Andrew Stubbs wrote: > On 28/09/2020 15:02, Tom de Vries wrote: >>> This patch simply skips barriers when they would "wait" for only one >>> thread (the current thread). This means that teams nested inside other >>> teams now run indepen

[PATCH] Add type arg to TARGET_LIBC_HAS_FUNCTION

2020-09-28 Thread Tom de Vries
symbol sincosl collect2: error: ld returned 1 exit status ... Add a type argument to target hook TARGET_LIBC_HAS_FUNCTION_TYPE, and use it in nvptx_libc_has_function_type to enable sincos and sincosf, but not sincosl. For now, a non-null type argument is only supported for fn_class == functio

Re: [PATCH] Add type arg to TARGET_LIBC_HAS_FUNCTION

2020-09-29 Thread Tom de Vries
On 9/29/20 8:59 AM, Richard Biener wrote: > On Mon, Sep 28, 2020 at 7:28 PM Tom de Vries wrote: >> >> [ was: Re: [Patch][nvptx] return true in libc_has_function for >> function_sincos ] >> >> On 9/26/20 6:47 PM, Tobias Burnus wrote: >>> Found when look

[committed][testsuite] Re-enable pr94600-{1,3}.c tests for arm

2020-09-30 Thread Tom de Vries
[ was: Re: [committed][testsuite] Require non_strict_align in pr94600-{1,3}.c ] On 9/30/20 4:53 AM, Hans-Peter Nilsson wrote: > On Thu, 24 Sep 2020, Tom de Vries wrote: > >> Hi, >> >> With the nvptx target, we run into: >> ... >> FAIL: gcc.dg/pr94600-1.c sc

[committed][testsuite] Enable pr94600-{1,3}.c tests for nvptx

2020-10-01 Thread Tom de Vries
[ was: Re: [committed][testsuite] Re-enable pr94600-{1,3}.c tests for arm ] On 10/1/20 7:38 AM, Hans-Peter Nilsson wrote: > On Wed, 30 Sep 2020, Tom de Vries wrote: > >> [ was: Re: [committed][testsuite] Require non_strict_align in >> pr94600-{1,3}.c ] >> >>

[committed][nvptx] Emit mov.u32 instead of cvt.u32.u32 for truncsiqi2

2020-10-01 Thread Tom de Vries
2 %r23, %r22; // 3[c=4] truncsiqi2/0 ... The cvt.u32.u32 can be written shorter and clearer as mov.u32. Fix this in define_insn "truncsi2". Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Emit mov.u32 instead of cvt.u32.u32 for truncsiqi2 gcc/ChangeLog: 2020

[PATCH][omp, simt] Handle alternative IV

2020-10-02 Thread Tom de Vries
of fd->loop.step by either step or orig_step. Build on x86_64-linux with nvptx accelerator, tested libgomp. This fixes for-5.c and for-6.c FAILs I'm currently seeing on a quadro m1200 with driver 450.66. OK for trunk? Thanks, - Tom [omp, simt] Handle alternative IV gcc/C

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-10-05 Thread Tom de Vries
On 9/22/20 6:38 PM, Tom de Vries wrote: > [ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB > with SIMT LANE [PR95654] ] > > On 9/16/20 8:20 PM, Alexander Monakov wrote: >> >> >> On Wed, 16 Sep 2020, Tom de Vries wrote: >> >>&

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-10-05 Thread Tom de Vries
On 9/24/20 2:44 PM, Richard Biener wrote: > On Thu, 24 Sep 2020, Tom de Vries wrote: > >> On 9/24/20 1:42 PM, Richard Biener wrote: >>> On Wed, 23 Sep 2020, Tom de Vries wrote: >>> >>>> On 9/23/20 9:28 AM, Richard Biener wrote: >>>>> On Tue

[PATCH][ftracer] Factor out can_duplicate_bb_p

2020-10-05 Thread Tom de Vries
[ was: Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region ] On 10/5/20 9:05 AM, Tom de Vries wrote: > Ack, updated the patch accordingly, and split it up in two bits, one > that does refactoring, and one that adds the actual caching: > - [ftracer] Factor out can_

[PATCH][ftracer] Add caching of can_duplicate_bb_p

2020-10-05 Thread Tom de Vries
[ was: Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region ] On 10/5/20 9:05 AM, Tom de Vries wrote: > Ack, updated the patch accordingly, and split it up in two bits, one > that does refactoring, and one that adds the actual caching: > - [ftracer] Factor out can_

[committed][omp, ftracer] Remove incorrect suggestion in ignore_bb_p

2020-10-05 Thread Tom de Vries
ng of SIMT_VOTE_ANY and SIMT_EXIT, which is not possible since VOTE_ANY may have data dependencies to storage that is deallocated by SIMT_EXIT. I've now opened a PR (PR97291) to describe the problem the reordering was intended to fix. Remove the incorrect suggestion. gcc/ChangeLog: 2020-10-05

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-05 Thread Tom de Vries
On 2/7/20 4:29 PM, Jakub Jelinek wrote: > On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: >> * {target-32.c, thread-limit-2.c}: >> no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR81690 > > Please don't, I want to deal with that using declare variant, just didn't > g

[committed][omp, ftracer] Ignore IFN_GOMP_SIMT_XCHG_* in ignore_bb_p

2020-10-05 Thread Tom de Vries
MP_SIMT_XCHG_* are part of the group marked by IFN_GOMP_SIMT_ENTER_ALLOC/IFN_GOMP_SIMT_EXIT, handle them conservatively in ignore_bb_p. Build on x86_64-linux with nvptx accelerator, tested with libgomp. gcc/ChangeLog: 2020-10-05 Tom de Vries * tracer.c (ignore_bb_p): Ignore GOMP_SIMT_XCHG_*.

[PATCH][omp, ftracer] Improve comment in ignore_bb_p

2020-10-05 Thread Tom de Vries
[ was: Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region ] On 10/5/20 10:51 AM, Alexander Monakov wrote: > On Mon, 5 Oct 2020, Tom de Vries wrote: > >> I've had to modify this patch in two ways: >> - the original test-case stopped failing, though not

[PATCH][openacc] Fix acc declare for VLAs

2020-10-06 Thread Tom de Vries
eclare map(from:(*A.1)) __builtin_stack_restore (saved_stack.2); } ... Build on x86_64-linux with nvptx accelerator, tested libgomp. OK for trunk? Thanks, - Tom [openacc] Fix acc declare for VLAs gcc/ChangeLog: 2020-10-06 Tom de Vries PR middle-end/90861

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-06 Thread Tom de Vries
On 10/5/20 3:15 PM, Tom de Vries wrote: > On 2/7/20 4:29 PM, Jakub Jelinek wrote: >> On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: >>> * {target-32.c, thread-limit-2.c}: >>> no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR816

Re: [PATCH] xfail and improve some failing libgomp tests

2020-10-06 Thread Tom de Vries
On 10/6/20 5:02 PM, Jakub Jelinek wrote: > On Tue, Oct 06, 2020 at 04:48:40PM +0200, Tom de Vries wrote: >> On 10/5/20 3:15 PM, Tom de Vries wrote: >>> On 2/7/20 4:29 PM, Jakub Jelinek wrote: >>>> On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: >

[PATCH][openacc, libgomp, testsuite] Xfail declare-5.f90

2020-10-06 Thread Tom de Vries
Xfail declare-5.f90 libgomp/ChangeLog: 2020-10-06 Tom de Vries * testsuite/libgomp.oacc-fortran/declare-5.f90: Add xfail for PR92790. --- libgomp/testsuite/libgomp.oacc-fortran/declare-5.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/d

[PATCH][tree-ssa-loop-ch] Add missing NULL test for dump_file

2020-10-06 Thread Tom de Vries
bout the (dump_flags & TDF_DETAILS) bit. ] OK for trunk? Thanks, - Tom [tree-ssa-loop-ch] Add missing NULL test for dump_file gcc/ChangeLog: 2020-10-07 Tom de Vries * tree-ssa-loop-ch.c (ch_base::copy_headers): Add missing NULL test for dump_file. --- gcc/tree-ssa-loop-ch.c |

[committed][libgomp, nvptx] Report launch dimensions in GOMP_OFFLOAD_run

2020-10-08 Thread Tom de Vries
with nvptx accelerator, tested libgomp. Committed to trunk. Thanks, - Tom [libgomp, nvptx] Report launch dimensions in GOMP_OFFLOAD_run libgomp/ChangeLog: 2020-10-08 Tom de Vries PR libgomp/81802 * plugin/plugin-nvptx.c (GOMP_OFFLOAD_run): Report launch dimensions

Re: [committed][nvptx] Split up function ref plus const

2020-10-09 Thread Tom de Vries
On 10/9/20 11:03 AM, Thomas Schwinge wrote: > Hi Tom! > > On 2020-09-23T22:46:34+0200, Tom de Vries wrote: >> With test-case gcc.c-torture/compile/pr92231.c, we run into: > > "Interesting" testcase... ;-) > >> ... >> nvptx-as: ptxas terminated wi

[committed][nvptx] Set -misa=sm_35 by default

2020-10-09 Thread Tom de Vries
2020-10-09 Tom de Vries PR target/97348 * config/nvptx/nvptx.h (ASM_SPEC): Also pass -m to nvptx-as if default is used. * config/nvptx/nvptx.opt (misa): Init with PTX_ISA_SM35. --- gcc/config/nvptx/nvptx.h | 5 - gcc/config/nvptx/nvptx.opt | 3 ++- 2

Re: [committed][nvptx] Set -misa=sm_35 by default

2020-10-09 Thread Tom de Vries
On 10/9/20 2:19 PM, Tobias Burnus wrote: > Hi, > > On 10/9/20 1:56 PM, Tom de Vries wrote: >> The default in the nvptx port for -misa=sm_xx is sm_30, but the ptxas >> of the >> latest cuda release (11.1) no longer supports sm_30. > > Interestingly, at > h

[RFC][gimple] Move can_duplicate_bb_p to gimple_can_duplicate_bb_p

2020-10-09 Thread Tom de Vries
, tree-ssa-threadupdate] ICE in duplicate_block, at cfghooks.c:1093". Any comments? Thanks, - Tom [gimple] Move can_duplicate_bb_p to gimple_can_duplicate_bb_p gcc/ChangeLog: 2020-10-09 Tom de Vries * tracer.c (cached_can_duplicate_bb_p): Use can_duplicate_block_p

[committed][nvptx] Factor out write_fn_proto_1

2020-10-10 Thread Tom de Vries
Hi, Factor out write_fn_proto_1 from write_fn_proto. Tested check-gcc on nvptx. Tested libgomp on x86_64-linux with nvptx accelerator. Committed to trunk. Thanks, - Tom [nvptx] Factor out write_fn_proto_1 gcc/ChangeLog: 2020-10-10 Tom de Vries * config/nvptx/nvptx.c

[committed][nvptx] Replace dots in function names

2020-10-10 Thread Tom de Vries
: 2020-10-10 Tom de Vries PR target/97318 * config/nvptx/nvptx.c (nvptx_replace_dot): New function. (write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn): Use nvptx_replace_dot. --- gcc/config/nvptx/nv

[committed][nvptx] Fix -msoft-stack-reserve-local format

2020-10-12 Thread Tom de Vries
hanks, - Tom [nvptx] Fix -msoft-stack-reserve-local format gcc/ChangeLog: 2020-10-12 Tom de Vries * config/nvptx/nvptx.opt (-msoft-stack-reserve-local): Rename to ... (-msoft-stack-reserve-local=): ... this. --- gcc/config/nvptx/nvptx.opt | 2 +- 1 file changed, 1 inse

[PING][PATCH][libgomp, nvptx] Fix hang in gomp_team_barrier_wait_end

2021-05-19 Thread Tom de Vries
On 4/23/21 6:48 PM, Tom de Vries wrote: > On 4/23/21 5:45 PM, Alexander Monakov wrote: >> On Thu, 22 Apr 2021, Tom de Vries wrote: >> >>> Ah, I see, agreed, that makes sense. I was afraid there was some >>> fundamental problem that I overlooked. >>> >

Re: [PATCH][libgomp, nvptx] Fix hang in gomp_team_barrier_wait_end

2021-05-20 Thread Tom de Vries
On 5/20/21 11:52 AM, Thomas Schwinge wrote: > Hi Tom! > > First, thanks for looking into this PR99555! > > > I can't comment on the OpenMP/nvptx changes, so just the following: > > On 2021-04-23T18:48:01+0200, Tom de Vries wrote: >> --- a/libgomp/testsuit

[PATCH][gcc/doc] Improve nonnull attribute documentation

2021-07-28 Thread Tom de Vries
at runtime with -O2: ... $ ~/gcc_versions/devel/install/bin/gcc test.c -O2 $ ./a.out Aborted (core dumped) ... while keeping the possibility to detect "isnull (NULL)" at compile time. OK for trunk? Thanks, - Tom [gcc/doc] Improve nonnull attribute documentation gcc/ChangeLog: 2021-07-28

Re: [PATCH][gcc/doc] Improve nonnull attribute documentation

2021-07-30 Thread Tom de Vries
On 7/30/21 9:25 AM, Richard Biener wrote: > On Wed, 28 Jul 2021, Tom de Vries wrote: > >> Hi, >> >> Improve nonnull attribute documentation in a number of ways: >> >> Reorganize discussion of effects into: >> - effects for calls to functions with nonnu

Re: [PATCH][gcc/doc] Improve nonnull attribute documentation

2021-07-30 Thread Tom de Vries
On 7/30/21 6:17 PM, Martin Sebor wrote: > On 7/28/21 9:20 AM, Tom de Vries wrote: >> Hi, >> >> Improve nonnull attribute documentation in a number of ways: >> >> Reorganize discussion of effects into: >> - effects for calls to functions with nonnull-marked pa

[PATCH][omp, simt] Fix expand_GOMP_SIMT_*

2021-04-28 Thread Tom de Vries
equal_p (target, ops[0].value)) emit_move_insn (target, ops[0].value); ... where applicable in the expand_GOMP_SIMT_* functions. Tested libgomp on x86_64 with nvptx accelerator. Any comments? Thanks, - Tom [omp, simt] Fix expand_GOMP_SIMT_* gcc/ChangeLog: 2021-04-28 Tom de Vrie

[committed][omp, simt] Handle alternative IV

2021-04-29 Thread Tom de Vries
On 4/22/21 1:46 PM, Tom de Vries wrote: > On 12/17/20 5:46 PM, Tom de Vries wrote: >> On 10/15/20 5:05 PM, Tom de Vries wrote: >>> On 10/2/20 3:21 PM, Tom de Vries wrote: >>>> Hi, >>>> >>>> Consider the test-case libgomp.c/pr81778.c added in th

[PATCH][openmp, simt] Error out for user-defined reduction

2021-05-03 Thread Tom de Vries
ion 'main': target-44.c:20:9: error: SIMT reduction not fully implemented ... Tested libgomp on x86_64-linux with and without nvptx accelerator. Any comments? Thanks, - Tom [openmp, simt] Error out for user-defined reduction gcc/ChangeLog: 2021-05-03 Tom de Vries PR

  1   2   3   4   5   6   7   8   9   10   >