Re: [patch, libgomp] Enable OpenACC GCN testing

2019-12-03 Thread Andrew Stubbs
wed-by tag, sorry). Andrew Enable OpenACC GCN testing. 2019-12-03 Andrew Stubbs libgomp/ * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): Recognize amdgcn. (check_effective_target_openacc_amdgcn_accel_present): New proc. (check_effective_target_openacc_amdgcn_acce

Re: Host/device shared memory

2019-12-02 Thread Andrew Stubbs
On 02/12/2019 14:23, Thomas Schwinge wrote: Hi! On 2019-11-15T13:43:04+0100, Jakub Jelinek wrote: On Fri, Nov 15, 2019 at 12:38:06PM +, Andrew Stubbs wrote: On 15/11/2019 12:21, Jakub Jelinek wrote: I'm surprised by the set acc_mem_shared 0, I thought gcn is a shared memory offlo

Re: [Patch] config/gcn/mkoffload.c – remove unused static vars

2019-11-25 Thread Andrew Stubbs
On 25/11/2019 14:17, Tobias Burnus wrote: The compiler warns that funcs_tail and vars_tails are unused – they, funcs_ids/var_ids and struct id_map seem to be a copy-n-paste leftovers from gcc/config/nvptx/mkoffload.c. Additionally, COMMENT_PREFIX does not seem to be used anywhere. (In the who

Re: [Patch][amdgcn] Silence warnings + add gcc_unreachable()

2019-11-25 Thread Andrew Stubbs
On 25/11/2019 11:14, Tobias Burnus wrote: This patch adds "gcc_unreachable ();" as suggested by me (cf. below). It also silences the -Wunused-variable + 'no return statement' warnings. OK for the trunk? OK. Thanks, Tobias. Andrew

[committed, amdgcn] Limit LDS usage

2019-11-22 Thread Andrew Stubbs
ocation remains unchanged for non-offload compiles (this is only really used for running the testsuite). -- Andrew Stubbs CodeSourcery / Mentor Graphics Limit LDS usage. 2019-11-22 Andrew Stubbs gcc/ * config/gcn/gcn.c (OMP_LDS_SIZE): Define. (ACC_LDS_SIZE): Define. (OTHER_LDS_SIZE): Def

[committed, amdgcn] Use GFX9 granulated sgprs count correctly

2019-11-22 Thread Andrew Stubbs
I've committed the attached. The patch adjusts the GCN kernel metadata so that it is correct for GFX9 devices. The existing implementation was correct for GFX8, and seems to work on GFX9, but wasn't technically correct. -- Andrew Stubbs CodeSourcery / Mentor Graphics Use GFX9

[patch, openacc] Fix ICE verifying gimple

2019-11-22 Thread Andrew Stubbs
The attached patch assigns the "(int) x" to a temporary and passes that to the function instead. OK to commit? -- Andrew Stubbs CodeSourcery / Mentor Graphics Normalize GOACC_parallel_keyed async parameter. 2019-11-22 Andrew Stubbs gcc/ * omp-expand.c (expand_omp_target): Pass s

[committed] Update loop-1.c test for amdgcn

2019-11-19 Thread Andrew Stubbs
sn't match. The code is still correct for the purpose of the testcase either way, however, so I'm removing the over-fussy match. Andrew Update loop-1.c test for amdgcn 2019-11-19 Andrew Stubbs gcc/testsuite/ * gcc.dg/tree-ssa/loop-1.c: Change amdgcn assembler scan. diff --git a/

[patch, openacc] Adjust tests for amdgcn offloading

2019-11-19 Thread Andrew Stubbs
This patch adds GCN special casing for most of the OpenACC libgomp tests that require it. It also disables one testcase that explicitly uses CUDA. OK to commit? Andrew Update OpenACC tests for amdgcn 2019-11-19 Andrew Stubbs libgomp/ * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1

Re: [PATCH 13/13] Enable worker partitioning for AMD GCN

2019-11-18 Thread Andrew Stubbs
On 15/11/2019 21:44, Julian Brown wrote: This patch flips the switch to enable worker partitioning on AMD GCN. OK? This is OK, although I think we could just remove that flag now. Andrew

Re: [PATCH 11/13] AMD GCN symbol output with null cfun

2019-11-18 Thread Andrew Stubbs
On 15/11/2019 21:44, Julian Brown wrote: This patch checks that cfun is valid in the gcn_asm_output_symbol_ref function. This prevents a crash when that function is called with NULL cfun, i.e. when outputting debug symbols. OK? OK, although that FIXME still baffles me. Andrew

Re: [PATCH 09/13] AMD GCN libgomp plugin queue-full condition locking fix

2019-11-18 Thread Andrew Stubbs
On 15/11/2019 21:44, Julian Brown wrote: @@ -2732,13 +2732,9 @@ wait_for_queue_nonfull (struct goacc_asyncqueue *aq) { if (aq->queue_n == ASYNC_QUEUE_SIZE) { - pthread_mutex_lock (&aq->mutex); - /* Queue is full. Wait for it to not be full. */ while (aq->queue_n

Re: [PATCH 08/13] Fix host-to-device copies from rodata for AMD GCN

2019-11-18 Thread Andrew Stubbs
On 15/11/2019 21:44, Julian Brown wrote: +static void +hsa_memory_copy_wrapper (void *dst, const void *src, size_t len) +{ + hsa_status_t status = hsa_fns.hsa_memory_copy_fn (dst, src, len); + + if (status == HSA_STATUS_SUCCESS) +return; + + /* It appears that the copy fails if the source

Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 15:51, Kwok Cheung Yeung wrote: On 15/11/2019 11:32 am, Andrew Stubbs wrote: On 14/11/2019 15:33, Kwok Cheung Yeung wrote: The kernel attributes are changed to request at least 64 SGPRs and 24 VGPRs (i.e. the non-kernel maximum, otherwise the callees may not have enough

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 12:43, Jakub Jelinek wrote: APUs, such as Carizzo are shared memory. DGPUs, such as Fiji and Vega, have their own memory. A DGPU can access host memory, provided that it has been set up just so, but that is very slow, and I don't know of a way to do that without still having to copy

Re: [patch, libgomp] Enable OpenACC GCN testing

2019-11-15 Thread Andrew Stubbs
On 15/11/2019 12:21, Jakub Jelinek wrote: On Thu, Nov 14, 2019 at 04:36:38PM +, Andrew Stubbs wrote: This patch adds some necessary bits to enable OpenACC testings for amdgcn offloading. The two "check_effective" procedures are not actually needed yet, but later patches to test

Re: [PATCH 5/5] [amdgcn] Unfix frame pointer

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:34, Kwok Cheung Yeung wrote: This patch unfixes the registers for the hard frame pointer so that they can be used for other purposes if the frame pointer is not in use. This patch is dependent on the commit 'Support using multiple registers to hold the frame pointer' (r277895)

Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:33, Kwok Cheung Yeung wrote: The kernel attributes are changed to request at least 64 SGPRs and 24 VGPRs (i.e. the non-kernel maximum, otherwise the callees may not have enough registers to run in) for non-leaf kernels to take advantage of the reduced number of registers used i

Re: [PATCH 3/5] [amdgcn] Restrict register usage in non-kernel functions

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:32, Kwok Cheung Yeung wrote: This patch restricts non-kernel functions to using a maximum of 64 SGPRs and 24 VGPRs. Kernels can request various pieces of information from the HSA runtime, and these will be loaded into the registers consecutively before the kernel executes. Th

Re: [PATCH 2/5] [amdgcn] Reinitialize registers for every function

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:30, Kwok Cheung Yeung wrote: The set of fixed registers is adjusted by the TARGET_CONDITIONAL_REGISTER_USAGE hook, but this needs to be done on a per-function basis, whereas the hook is normally called once during GCC initialization before any functions have been processed (whi

Re: [PATCH 1/5] [amdgcn] Use first lane of v1 for zero constant

2019-11-15 Thread Andrew Stubbs
On 14/11/2019 15:30, Kwok Cheung Yeung wrote: GCN 5 has commonly-used global memory instructions that specify the address as [SGPR address] + [VGPR offset] + [constant offset], and we often want the VGPR offset to be zero, so v0 is currently reserved for that purpose. However, v1 contains [0,

Re: [patch, libgomp] Add tests for print from offload target

2019-11-14 Thread Andrew Stubbs
On 14/11/2019 17:05, Jakub Jelinek wrote: On Thu, Nov 14, 2019 at 04:47:49PM +, Andrew Stubbs wrote: This patch adds new libgomp tests to ensure that C "printf" and Fortran "write" work correctly within offload kernels. Both should work for amdgcn, but nvptx uses the

[patch, libgomp] Add tests for print from offload target

2019-11-14 Thread Andrew Stubbs
om offload kernels is not recommended in production, but can be useful in development. OK to commit? Thanks Andrew Add tests for print from offload target. 2019-11-14 Andrew Stubbs libgomp/ * testsuite/libgomp.c/target-print-1.c: New file. * testsuite/libgomp.fortran/target-print-1.f9

[patch, libgomp] Enable OpenACC GCN testing

2019-11-14 Thread Andrew Stubbs
Hi, This patch adds some necessary bits to enable OpenACC testings for amdgcn offloading. The two "check_effective" procedures are not actually needed yet, but later patches to test cases will use them. OK to commit? Thanks Andrew Enable OpenACC GCN testing. 2019-11-14 And

Re: [PATCH] [GCN] Fix handling of VCC_CONDITIONAL_REG

2019-11-14 Thread Andrew Stubbs
On 14/11/2019 12:43, Kwok Cheung Yeung wrote: Hello This patch fixes an issue seen in the following test cases on AMD GCN: libgomp.oacc-fortran/gemm.f90 libgomp.oacc-fortran/gemm-2.f90 libgomp.c/for-5-test_ttdpfs_ds128_auto.c libgomp.c/for-5-test_ttdpfs_ds128_guided32.c libgomp.c/for-5-test_ttd

Re: [PATCH 0/7 libgomp,amdgcn] AMD GCN Offloading Support

2019-11-13 Thread Andrew Stubbs
These patches are now all committed. I've adjusted the changelogs to list all the proper authors (apologies if I missed anyone). Thank you for the quick reviews, Jakub. :-) Andrew On 12/11/2019 13:29, Andrew Stubbs wrote: Hi all, This patch series contributes initial OpenMP and Op

[committed, amdgcn] Move gcn-run heap into GPU memory

2019-11-13 Thread Andrew Stubbs
fload kernels will experience, and therefore make standalone testing more meaningful. Andrew Move gcn-run heap into GPU memory. 2019-11-13 Andrew Stubbs gcc/ * config/gcn/gcn-run.c (heap_region): New global variable. (struct hsa_runtime_fn_info): Add hsa_memory_assign_age

Re: [PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Andrew Stubbs
e that the loop would vectorize inline, but I don't think it was doing so anyway. I need to look at that, but how is this, for now? Andrew Optimize GCN OpenMP malloc performance 2019-11-12 Andrew Stubbs libgomp/ * config/gcn/team.c (gomp_gcn_enter_kernel): Set up t

Re: [PATCH 7/7 libgomp,amdgcn] GCN Libgomp Plugin

2019-11-12 Thread Andrew Stubbs
On 12/11/2019 14:01, Jakub Jelinek wrote: On Tue, Nov 12, 2019 at 01:29:16PM +, Andrew Stubbs wrote: 2019-11-12 Andrew Stubbs libgomp/ * plugin/Makefrag.am: Add amdgcn plugin support. * plugin/configfrag.ac: Likewise. * plugin/plugin-gcn.c: New file

Re: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-11-12 Thread Andrew Stubbs
On 12/11/2019 13:46, Jakub Jelinek wrote: On Tue, Nov 12, 2019 at 01:29:13PM +, Andrew Stubbs wrote: 2019-11-12 Andrew Stubbs include/ * gomp-constants.h (GOMP_DEVICE_GCN): Define. (GOMP_VERSION_GCN): Define. Perhaps this could be 0, but not a big deal. OG9

[PATCH 6/7 amdgcn] Use a single worker for OpenACC on AMD GCN

2019-11-12 Thread Andrew Stubbs
This patch prevents the compiler using multiple workers in a gang. This should be reverted when worker support is committed. I will commit this with the reset of the series. Andrew 2019-11-12 Andrew Stubbs Julian Brown gcc/ * config/gcn/gcn.c

[PATCH 5/7 libgomp,amdgcn] Optimize GCN OpenMP malloc performance

2019-11-12 Thread Andrew Stubbs
l search and replace. Dummy pass-through definitions are provided for other targets. OK to commit? Thanks Andrew 2019-11-12 Andrew Stubbs libgomp/ * config/gcn/team.c (gomp_gcn_enter_kernel): Set up the team arena and use team_malloc variants. (gomp_gcn_exit_ke

[PATCH 7/7 libgomp,amdgcn] GCN Libgomp Plugin

2019-11-12 Thread Andrew Stubbs
This patch contributes the GCN libgomp plugin, with the various configure and make bits to go with it. This implementation is a much-cleaned-up version of the one present on the openacc-gcc-9-branch. OK to commit? Thanks Andrew 2019-11-12 Andrew Stubbs libgomp/ * plugin

[PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-11-12 Thread Andrew Stubbs
new target-specific symbols to be added to libgomp. I couldn't find an existing way to do this without adding a new top-level file also, to there's an empty placeholder also. (The OG9 branch has this symbol in libgcc, but that seems wrong.) OK to commit? Thanks Andrew 2019-11-12

[PATCH 3/7 libgomp,nvptx] Add device number to GOMP_OFFLOAD_openacc_async_construct

2019-11-12 Thread Andrew Stubbs
e the queue is intended, so this simply provides that information to the queue constructor. OK to commit? Thanks Andrew 2019-11-12 Andrew Stubbs libgomp/ * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int parameter. * oacc-as

[PATCH 2/7 amdgcn] GCN mkoffload

2019-11-12 Thread Andrew Stubbs
This patch adds the mkoffload tool to the amdgcn backend. It's similar, but not quite the same as that on the openacc-gcc-9-branch. I will commit this patch when the others in this series are approved. Andrew 2019-11-12 Andrew Stubbs gcc/ * config/gcn/mkoffload.c: New

[PATCH 1/7 libgomp,nvptx] Move generic libgomp files from nvptx to accel

2019-11-12 Thread Andrew Stubbs
shared with the GCN port, thus preventing much of the duplication. OK to commit? Thanks Andrew 2019-11-12 Andrew Stubbs libgomp/ * configure.tgt (nvptx*-*-*): Add "accel" directory. * config/nvptx/libgomp-plugin.c: Move ... * config/accel/libgomp-plugin.c: ..

[PATCH 0/7 libgomp,amdgcn] AMD GCN Offloading Support

2019-11-12 Thread Andrew Stubbs
to forward-port. Otherwise that will have to wait for GCC 11. Andrew Andrew Stubbs (7): Move generic libgomp files from nvptx to accel GCN mkoffload Add device number to GOMP_OFFLOAD_openacc_async_construct GCN libgomp port Optimize GCN OpenMP malloc performance Use a single worker for Ope

Re: [Patch][AMD GCN][OpenMP] Add gcc/config/gcn/t-omp-device for OpenMP declare variant kind/arch/isa

2019-11-04 Thread Andrew Stubbs
On 04/11/2019 15:37, Jakub Jelinek wrote: My preference would be that arch on amdgcn is something like amdgcn or gcn. I hope the general distinction between arch and isa will be something that will be discussed next Tuesday on the language committee, so hopefully we'll know more afterwards and ca

[OG9, amdgcn, committed] Fix memory leak in libgomp

2019-09-10 Thread Andrew Stubbs
Committed to OG9 on behalf of Kwok ... The list of struct gomp_threads allocated in gomp_gcn_enter_kernel was not being freed in gomp_gcn_exit_kernel, leading to a small memory leak every time a kernel is run. Runs with a lot of teams or many kernels were running out of heap space. Andrew Fi

[OG9, amdgcn, committed] Detect the actual number of hardware CUs

2019-09-10 Thread Andrew Stubbs
te Runtime (ROCr), but there are license issues with that. We could extract them from the documentation, but this is still on my TODO list. Andrew Detect number of GPU compute units. 2019-09-10 Andrew Stubbs libgomp/ * plugin/plugin-gcn.c (HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUN

[OG9, amdgcn, committed] Use GFX9 granulated sgprs count correctly

2019-09-10 Thread Andrew Stubbs
would hurt performance. Andrew Use GFX9 granulated sgprs count correctly. 2019-09-10 Andrew Stubbs gcc/ * config/gcn/gcn.c (gcn_hsa_declare_function_name): Calculate granulated_sgprs according to architecture. diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index 66854b6f9c5..f8434e4a

[OG9, amdgcn,committed] Fix relocations with multiple devices

2019-09-10 Thread Andrew Stubbs
alternative would be to copy the entire image before modifying it, each time it is loaded. Andrew Fix relocations with multiple devices. 2019-09-10 Andrew Stubbs libgomp/ * plugin/plugin-gcn.c (obstack_chunk_alloc): Delete. (obstack_chunk_free): Delete. (obstack.h): Remove include

[OG9, amdgcn, committed] Move offload data to graphics memory

2019-09-09 Thread Andrew Stubbs
ointers to device data, and is typically read only once. It also contains the print output data, but this is not performance critical (as in, don't use it if you care about performance). This may need to be reviewed if we want to use it for profiling. Andrew Move offload data into G

[OG9, committed] Backport gfx906 patches

2019-09-06 Thread Andrew Stubbs
I've just backported these from mainline. They add the Vega 20 gfx906 architecture and multilib. Andrew Document -march=gfx906 option. 2019-06-07 Andrew Stubbs gcc/ * doc/invoke.texi (AMD GCN Options): Add gfx906. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 3103f8

[OG9, committed] Backport error message for mapped parameters

2019-09-06 Thread Andrew Stubbs
I've backported this patch from mainline. Andrew Tweak error message for mapped parameters. 2019-07-05 Andrew Stubbs gcc/fortran/ * openmp.c (resolve_omp_clauses): Add custom error messages for parameters in map clauses. diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c

Re: [OG9, committed] Backport GCN expcnt patches

2019-09-06 Thread Andrew Stubbs
On 06/09/2019 08:42, Bernhard Reutner-Fischer wrote: On 5 September 2019 18:07:25 CEST, Andrew Stubbs wrote: I just committed the attached patch to the openacc-gcc-9-branch. + /* Store that requires input registers are not overwritten by +following instruction

[OG9, committed] Backport GCN expcnt patches

2019-09-05 Thread Andrew Stubbs
I just committed the attached patch to the openacc-gcc-9-branch. The patch removes the redundant s_waitcnt instruction from store instructions. The s_waitcnt with expcnt was a misunderstanding of the documentation. Andrew Backport expcnt patches. 2019-09-05 Andrew Stubbs Backport from

Re: [committed, amdgcn] Remove expcnt waits.

2019-09-05 Thread Andrew Stubbs
On 31/07/2019 13:02, Andrew Stubbs wrote: However, in a couple of cases there is an exposed-pipeline issue that needs to be resolved with an actual "nop", which we no longer have. The patch also takes care of adding these, where appropriate. (As it happens, the cmpswap instruction wi

Re: [PATCH 02/25] Propagate address spaces to builtins.

2019-09-03 Thread Andrew Stubbs
On 03/09/2019 15:01, Kyrill Tkachov wrote: Sorry for responding to this so late. I'm testing a rebased version of Richard's OOL atomic patches [1] and am hitting an ICE building the -mabi=ilp32 libgfortran multilib for aarch64-none-elf: I thought Andreas already fixed ILP32. https://gcc.gnu.o

[committed, amdgcn] Remove expcnt waits.

2019-07-31 Thread Andrew Stubbs
cmpswap instruction will now get both s_waitcnt and nop, which is unnecessary, but that's because I plan to add proper scheduling for all the s_waitcnt instructions in the near future, and I don't want this detail to get forgotten.) Andrew Stubbs Mentor Graphics / CodeSourcery Remo

[OG9] Improve diagnostics for unmappable types

2019-07-09 Thread Andrew Stubbs
I've backported Jakub's patch to openacc-gcc-9-branch. Andrew On 08/07/2019 23:10, Jakub Jelinek wrote: On Thu, Jul 04, 2019 at 12:44:32PM +0100, Andrew Stubbs wrote: On 03/07/2019 18:58, Jason Merrill wrote: OK, thanks. Committed. This broke following testcase. error_mark

Re: [patch, c++ openmp] Improve diagnostics for unmappable types

2019-07-09 Thread Andrew Stubbs
On 08/07/2019 23:10, Jakub Jelinek wrote: This broke following testcase. error_mark_node type isn't really incomplete, it is errorneous, doesn't have TYPE_MAIN_DECL and we should have diagnosed it earlier, so it makes no sense to emit extra explanation messages. Apologies. Did I miss something

[committed, openmp/openacc] Tweak error message for mapped parameters

2019-07-05 Thread Andrew Stubbs
hould be the compiler that arranges that (PR90779) and the user has no way to overide or force that behavior. Here's what Jakub approved via IRC. Now committed. Thanks Jakub Andrew Tweak error message for mapped parameters. 2019-07-05 Andrew Stubbs gcc/fortran/ * openmp.c (resolve

Re: [03/11] [amdgcn] Fix ambiguous .md attribute uses

2019-07-05 Thread Andrew Stubbs
On 05/07/2019 16:12, Richard Sandiford wrote: This patch is part of a series that fixes ambiguous attribute uses in .md files, i.e. cases in which attributes didn't use to specify an iterator, and in which could have different values depending on the iterator chosen. I think this is a genuine

Re: [patch, openmp/openacc] Allow Fortran parameters in map/copy.

2019-07-05 Thread Andrew Stubbs
ameters. 2019-07-05 Andrew Stubbs gcc/fortran/ * openmp.c (resolve_omp_clauses): Add custom error messages for parameters in map clauses. gcc/testsuite/ * gfortran.dg/gomp/map-1.f90: Update error message text. diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 1c7bce6c300..e05bf84f

Re: [patch, openmp/openacc] Allow Fortran parameters in map/copy.

2019-07-05 Thread Andrew Stubbs
On 05/07/2019 12:49, Jakub Jelinek wrote: On Fri, Jul 05, 2019 at 12:31:17PM +0100, Andrew Stubbs wrote: This patch allows Fortran "parameter" named constants to be named in OpenMP map and OpenACC copy directives. Right now, the compiler just says something like: !$omp targe

[patch, openmp/openacc] Allow Fortran parameters in map/copy.

2019-07-05 Thread Andrew Stubbs
e in some case (can it happen?), I believe it will be automatically mapped in the same way other variables are. Using parameters in device_resident, deviceptr, private, reduction, etc., remains an error. OK to commit? Andrew Allow Fortran parameters in map/copy directives. 2019-0

[OG9] Improve diagnostics for unmappable types

2019-07-04 Thread Andrew Stubbs
This patch has now been backported to openacc-gcc-9-branch (git). Andre On 01/07/2019 12:16, Andrew Stubbs wrote: Improve OpenMP map diagnostics. 2019-07-01 Andrew Stubbs gcc/cp/ * cp-tree.h (cp_omp_emit_unmappable_type_notes): New prototype. * decl.c (cp_finish_decl

Re: [patch, c++ openmp] Improve diagnostics for unmappable types

2019-07-04 Thread Andrew Stubbs
On 03/07/2019 18:58, Jason Merrill wrote: OK, thanks. Committed. Thanks for the reviews. Andrew

[committed, amdgcn] Fix regrename ICE

2019-07-02 Thread Andrew Stubbs
assumptions about how RTX entries are shared in memory. The fix is simply to hide the save-restore, for now. We end up with the same instruction sequence anyway. Andrew Stubbs Mentor Graphics / CodeSourcery Fix amdgcn regrename ICE. 2019-07-02 Andrew Stubbs gcc/ * config/gcn/gcn.md

Re: [patch, c++ openmp] Improve diagnostics for unmappable types

2019-07-01 Thread Andrew Stubbs
x27;s print the type with %qT. +    if (notes) +  result = false; +    else +  return false; Returning early when !notes doesn't seem worth the extra lines of code. How is this version? Andrew Improve OpenMP map diagnostics. 2019-07-01 Andrew Stubbs

Re: [committed, amdgcn] Disable trampolines on GCN5

2019-06-28 Thread Andrew Stubbs
On 22/05/2019 23:21, Andrew Stubbs wrote: Trampolines work just fine on GCN3 devices, but GCN5 devices have execute permission hardware, and the driver sets permission off for the private segment allocation in which the stacks are located. It may be possible to implement indirect calls to

[patch, c++ openmp] Improve diagnostics for unmappable types

2019-06-28 Thread Andrew Stubbs
ematic fields in the whole type, recursively. If anybody knows how to report the location of incomplete array declarations then that would be nice to add. OK to commit? Andrew Improve OpenMP map diagnostics. 2019-06-27 Andrew Stubbs gcc/cp/ * cp-tree.h (cp_omp_emit_u

Re: [committed, amdgcn] Wait for exit value to write before exiting.

2019-06-25 Thread Andrew Stubbs
On 24/05/2019 16:31, Andrew Stubbs wrote: This patch fixes a bug in which GCN5 devices often fail to return an exit value because it's not yet been written to memory when the program exits. The fix is simply to wait for it properly. GCN3 devices did not demonstrate the problem, but i

Re: [committed, amdgcn] Fix stack initialization bug

2019-06-25 Thread Andrew Stubbs
On 24/05/2019 12:12, Andrew Stubbs wrote: This patch fixes a 64-bit arithmetic bug in which the wrong instruction was used for the lo-part resulting in an incorrect calculation for the hi-part (signed vs. unsigned add). This causes a Memory Access Fault whenever the launcher happens to choose

Re: [PATCH 2/3] Stub implementation of unwinding for AMD GCN.

2019-06-19 Thread Andrew Stubbs
On 19/06/2019 17:04, Jeff Law wrote: On 6/19/19 2:58 AM, Andrew Stubbs wrote: Ping. I can probably approve this myself, as it only affects GCN, but I'd appreciate a second opinion. Similarly this is fine to self-approve. Thanks. Sorry, same again, I meant I'd like another opin

Re: [PATCH 1/3] Create GCN-specific gthreads

2019-06-19 Thread Andrew Stubbs
On 19/06/2019 17:04, Jeff Law wrote: On 6/19/19 2:57 AM, Andrew Stubbs wrote: Ping. I can probably approve this myself, as it only affects GCN, but I'd appreciate a second opinion. Yes, this would fall under things you could approve yourself. Thanks for double-checking. Sorry, I mean

Re: [PATCH 2/3] Stub implementation of unwinding for AMD GCN.

2019-06-19 Thread Andrew Stubbs
Ping. I can probably approve this myself, as it only affects GCN, but I'd appreciate a second opinion. Thanks Andrew On 07/06/2019 15:40, Andrew Stubbs wrote: This patch provides the "_Unwind_Backtrace" and "_Unwind_GetIPInfo" symbols required to link programs usin

Re: [PATCH 1/3] Create GCN-specific gthreads

2019-06-19 Thread Andrew Stubbs
Ping. I can probably approve this myself, as it only affects GCN, but I'd appreciate a second opinion. Thanks Andrew On 07/06/2019 15:39, Andrew Stubbs wrote: This patch creates a new gthread model for AMD GCN devices. For now, there's just enough support for libgfortran to use

[PATCH 3/3] Enable full libgfortran library for AMD GCN

2019-06-07 Thread Andrew Stubbs
This patch basically reverts the previous patch to put AMD GCN in "minimal" mode. OK to commit? -- Andrew Stubbs Mentor Graphics / CodeSourcery Enable full GFortran library for AMD GCN 2019-06-07 Kwok Cheung Yeung Andrew Stubbs libgfortran/ * configure:

[PATCH 1/3] Create GCN-specific gthreads

2019-06-07 Thread Andrew Stubbs
OpenMP or OpenACC offload kernels, so those functions are also stub implementations. OK to commit? -- Andrew Stubbs Mentor Graphics / CodeSourcery Create GCN-specific gthreads 2019-06-05 Kwok Cheung Yeung Andrew Stubbs gcc/ * config.gcc (thread_file): Set to gcn f

[PATCH 2/3] Stub implementation of unwinding for AMD GCN.

2019-06-07 Thread Andrew Stubbs
Work. OK to commit? -- Andrew Stubbs Mentor Graphics / CodeSourcery Stub implementation of unwinding for AMD GCN. 2019-06-07 Andrew Stubbs libgcc/ * config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c. * config/gcn/unwind-gcn.c: New file. diff --git a/libgcc/config/gcn/t-amdgcn b/libgcc/confi

[PATCH 0/3] Enable full libgfortran for AMD GCN

2019-06-07 Thread Andrew Stubbs
e third patch enables the rest of libgfortran. -- Andrew Stubbs Mentor Graphics / CodeSourcery

Re: [committed, amdgcn] Add -march=gfx906 for Vega20

2019-06-07 Thread Andrew Stubbs
On 07/06/2019 00:44, Joseph Myers wrote: On Thu, 6 Jun 2019, Andrew Stubbs wrote: This patch adds a new -march=gfx906 option, and a new multilib to go with it. This is missing an invoke.texi update. Thanks for spotting that Joseph. I've committed the attached, as obvious. Andrew Doc

[committed, amdgcn] Add -march=gfx906 for Vega20

2019-06-06 Thread Andrew Stubbs
that's the easiest solution to use for now. Andrew Add -march=gfx906 for AMD GCN. 2019-06-06 Andrew Stubbs gcc/ * config.gcc (amdgcn-*-*): Allow --with-arch=gfx906. * config/gcn/gcn.opt (gpu_type): Add gfx906. * config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add gfx906 mul

[committed, amdgcn] Wait for exit value to write before exiting.

2019-05-24 Thread Andrew Stubbs
g was introduced when we stopped waiting for all writes to complete. I've also taken the opportunity to adjust gcn-run such that a similar issue can't go unnoticed for so long, in future. Andrew Stubbs Mentor Graphics / CodeSourcery GCN: Wait for exit value to write before exiting. 201

[committed, amdgcn] Fix stack initialization bug

2019-05-24 Thread Andrew Stubbs
allocation. This problem never occurred on GCN3 because the launcher always chose addresses in the 32-bit range. It seems to happen more frequently on GCN5 devices since a recent ROCm update. -- Andrew Stubbs Mentor Graphics / CodeSourcery Fix 64-bit addition in prologue. 2019-05-24 Andrew Stubbs

[committed, amdgcn] Add support for constructors and destructors

2019-05-22 Thread Andrew Stubbs
launch the initialization and finalization kernels, in addition to the main entry point. -- Andrew Stubbs Mentor Graphics / CodeSourcery Add support for constructors and destuctors on GCN 2019-05-22 Kwok Cheung Yeung Andrew Stubbs AMDGPU-230 gcc/ * config.gcc (gcc_cv_init

[committed, amdgcn] Disable trampolines on GCN5

2019-05-22 Thread Andrew Stubbs
this will prevent unexplained crashes or hangs on unsupported devices. -- Andrew Stubbs Mentor Graphics / CodeSourcery Fix trampoline execution failures on GCN5. 2019-05-22 Andrew Stubbs gcc/ * config/gcn/gcn.c (gcn_trampoline_init): Call "sorry" on GCN5. diff --git a/gcc/config/g

Re: [patch] Fix coarray_lock_7.f90 test failure

2019-05-22 Thread Andrew Stubbs
On 22/05/2019 12:38, Janne Blomqvist wrote: Ok. Thanks, committed. Andrew

Re: [patch] Fix Fortran size_t parameter passing

2019-05-22 Thread Andrew Stubbs
On 22/05/2019 13:28, Janne Blomqvist wrote: Just to confirm, is the attached what you mean? Yes, looks good. Thanks, now committed. Andrew

Re: [patch] Fix Fortran size_t parameter passing

2019-05-22 Thread Andrew Stubbs
compatible with integer_type_node, but size_zero_node is not (necessarily) compatible with size_type_node? Well, that's just asking for trouble. :-( Just to confirm, is the attached what you mean? Thanks Andrew Fix fortran size_type_node parameter passing. 2019-05-22 Andrew Stubbs gcc/fo

[patch] Fix coarray_lock_7.f90 test failure

2019-05-22 Thread Andrew Stubbs
able-width matches. OK to commit? Andrew Fix new coarray failures. 2019-05-22 Andrew Stubbs gcc/testsuite/ * gfortran.dg/coarray_lock_7.f90: Fix output patterns. diff --git a/gcc/testsuite/gfortran.dg/coarray_lock_7.f90 b/gcc/testsuite/gfortran.dg/coarray_lock_7.f90 index aedb2267413..4f4bdde8

[patch] Fix Fortran size_t parameter passing

2019-05-22 Thread Andrew Stubbs
e_zero_node". I presume this works on other architectures because the types are the same size, or else because parameters are always 64-bit wide. OK to commit? Andrew Fix fortran size_t parameter passing. 2019-05-22 Andrew Stubbs gcc/fortran/ * trans-stmt.c (gfc_trans_critical): Us

Re: [PR86438] avoid too-long shift in test

2019-04-15 Thread Andrew Stubbs
On 12/04/2019 02:42, Alexandre Oliva wrote: The test fell back to long long and long when __int128 is not available, but it assumed sizeof(long) < sizeof(long long) because of a shift count that would be out of range for a long long if their widths are the same. Fixed by splitting it up into two

[committed gcn] Fix scc clobber in movdi_symbol

2019-03-27 Thread Andrew Stubbs
live. Tested for amdgcn-unknown-amdhsa with no regressions. Andrew Stubbs Mentor Graphics / CodeSourcery Fix scc clobber in movdi_symbol. 2019-03-27 Andrew Stubbs gcc/ * config/gcn/gcn.md (CC_SAVE_REG): New constant. (movdi): Call gen_movdi_symbol_save_scc. (gen_movdi_symbol_save_scc): New ins

[gcn commit] Implement circular output buffer

2019-03-18 Thread Andrew Stubbs
egressions. Andrew Stubbs Mentor Graphics / CodeSourcery Implement circular print buffer. 2019-03-18 Andrew Stubbs gcc/ * config/gcn/gcn-run.c (struct output): Make next_output unsigned. Extend queue to 1024 entries. Add "consumed" field. (gomp_print_output): Remove print_index p

Re: [PATCH] Fix PR88074

2019-02-20 Thread Andrew Stubbs
On 20/02/2019 13:22, Jakub Jelinek wrote: On Wed, Feb 20, 2019 at 11:13:54AM +, Andrew Stubbs wrote: This patch causes a number of test regressions for (at least) arm and amdgcn. I've run a bisect and confirmed this is the first commit where it doesn't work. The following, so fa

Re: [PATCH] Fix PR88074

2019-02-20 Thread Andrew Stubbs
On 19/02/2019 12:45, Richard Biener wrote: The following limits mpfr operations to the maximum exponent range as determined by available float modes. This avoids excessive work for evaluating functions like ctan for large arguments. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied

Re: [PATCH] Fix up and improve allow_blank_lines testsuite handling (PR other/69006, PR testsuite/88920)

2019-02-13 Thread Andrew Stubbs
On 13/02/2019 09:09, Jakub Jelinek wrote: To make it work together with doing llvm_binutils only once, the global now has multiple values 0 - disallow blank lines 1 - allow them for a single test only, reset after testing it in gcc-dg-prune 2 - allow it for all tests (llvm_binutils) FWIW, this

Re: Andrew Stubbs and Julian Brown appointed AMD GCN maintainers

2019-02-11 Thread Andrew Stubbs
On 08/02/2019 16:10, David Edelsohn wrote: I am pleased to announce that the GCC Steering Committee has appointed Andrew Stubbs and Julian Brown as AMD GCN maintainers. Many thanks to David and the Steering Committee! I've committed the attached. Andrew Add AMD GCN maintainers

Re: [patch][pr88920] Fix noisy check_effective_target_offload_gcn

2019-01-30 Thread Andrew Stubbs
On 29/01/2019 11:31, Richard Biener wrote: OK. Thanks. Patch committed. Andrew

[patch][pr88920] Fix noisy check_effective_target_offload_gcn

2019-01-29 Thread Andrew Stubbs
the message does not show up at all, unless the verbosity level is raised? Thanks Andrew Cache effective-target llvm_binutils result. 2019-01-21 Andrew Stubbs gcc/testsuite/ * lib/target-supports.exp: Cache result. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib

Re: [patch] Document AMD GCN features.

2019-01-22 Thread Andrew Stubbs
On 21/01/2019 18:03, Jeff Law wrote: 2019-01-18 Andrew Stubbs gcc/ * doc/extend.tex (AMD GCN Function Attributes): New section. * doc/install.texi (amdgcn-unknown-amdhsa): New instructions. * doc/invoke.texi (AMD GCN Options): New section. * doc

[patch] Document AMD GCN features.

2019-01-18 Thread Andrew Stubbs
Hi, This patch adds the documentation needed for the newly-added AMD GCN back end. OK to commit? Andrew Document AMD GCN. 2019-01-18 Andrew Stubbs gcc/ * doc/extend.tex (AMD GCN Function Attributes): New section. * doc/install.texi (amdgcn-unknown-amdhsa): New instructions. * doc

Re: [wwwdocs] Mention AMD GCN on the website

2019-01-17 Thread Andrew Stubbs
On 17/01/2019 17:39, Andi Kleen wrote: Can you add a few words on the current limitations? How's this? Andrew diff --git a/htdocs/backends.html b/htdocs/backends.html index bb70aa6..eecd09a 100644 --- a/htdocs/backends.html +++ b/htdocs/backends.html @@ -81,6 +81,7 @@ csky |

[wwwdocs] Mention AMD GCN on the website

2019-01-17 Thread Andrew Stubbs
AMD GCN has now been committed to the trunk. Is the attached OK for the website? Most of the wording has been modelled on the existing C-SKY announcements. Thanks Andrew diff --git a/htdocs/backends.html b/htdocs/backends.html index bb70aa6..eecd09a 100644 --- a/htdocs/backends.html +++ b/htd

Re: [PATCH v3 00/10] AMD GCN Port v3

2019-01-17 Thread Andrew Stubbs
On 14/01/2019 13:55, Andrew Stubbs wrote: I will now rebase, retest, change all the dates to 2019, and get it committed. This is now done! :-) THe Newlib port is also committed, so all the pieces needed for testing GCN should be available to everybody now. To be clear, the libgomp port

Re: [PATCH v3 00/10] AMD GCN Port v3

2019-01-14 Thread Andrew Stubbs
On 11/01/2019 23:19, Jeff Law wrote: And I think the V3 patch is reasonable enough to go in now. There's some concerns that have been raised with the implementation, but I'm comfortable with Andrew faulting in fixes if those concerns turn into real issues. Andrew, you're green-lighted for the t

<    2   3   4   5   6   7   8   9   10   11   >