Re: [PATCH] i386: Enable AVX/AVX512 features only if supported by OSXSAVE

2018-03-30 Thread Ilya Verbin
2018-03-30 20:56 GMT+03:00 H.J. Lu <hjl.to...@gmail.com>: > On Fri, Mar 30, 2018 at 10:19 AM, Ilya Verbin <iver...@gmail.com> wrote: >> This check will always disable AVX-512 on macOS, because they >> implemented on-demand support: >> https:/

Re: [PATCH] i386: Enable AVX/AVX512 features only if supported by OSXSAVE

2018-03-30 Thread Ilya Verbin
This check will always disable AVX-512 on macOS, because they implemented on-demand support: https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L176 (I'm not against this change, just for information). 2018-03-29 16:05 GMT+03:00 Uros Bizjak

Re: Import libcilkrts Build 4467 (PR target/68945)

2016-11-18 Thread Ilya Verbin
2016-11-17 20:01 GMT+03:00 Jeff Law <l...@redhat.com>: > On 11/17/2016 09:56 AM, Ilya Verbin wrote: >> >> 2016-11-17 18:50 GMT+03:00 Rainer Orth <r...@cebitec.uni-bielefeld.de>: >>> >>> Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: >>

Re: Import libcilkrts Build 4467 (PR target/68945)

2016-11-17 Thread Ilya Verbin
2016-11-17 18:50 GMT+03:00 Rainer Orth : > Rainer Orth writes: > >> I happened to notice that my libcilkrts SPARC port has been applied >> upstream. So to reach closure on this issue for the GCC 7 release, I'd >> like to import

[PATCH, AVX-512, committed] Fix detection of AVX512IFMA in host_detect_local_cpu

2016-08-31 Thread Ilya Verbin
Hi! I've committed this patch as obvious. gcc/ * config/i386/driver-i386.c (host_detect_local_cpu): Fix detection of AVX512IFMA. Index: gcc/config/i386/driver-i386.c === --- gcc/config/i386/driver-i386.c (revision 239907) +++

[PATCH, i386, AVX-512ER] vrsqrt28ps auto generation

2016-06-20 Thread Ilya Verbin
Hi! This patch emits vrsqrt28ps instruction in ix86_emit_swsqrtsf for recip case and vrcp28ps(vrsqrt28ps(a)) for !recip. Regtested using various benchmarks on a AVX-512ER machine. OK for trunk? gcc/ * config/i386/i386.c (ix86_emit_swsqrtsf): Emit vrsqrt28ps. *

[PATCH, i386, AVX-512ER] vrcp28ps auto generation

2016-06-20 Thread Ilya Verbin
Hi! This patch emits vrcp28ps and vmulps istructions for ix86_emit_swdivsf. The relative error is < 2^-23, so no additional iteration is necessary. Regtested using various benchmarks on a AVX-512ER machine. OK for trunk? gcc/ * config/i386/i386.c (ix86_emit_swdivsf): Emit vrcp28ps.

Re: Cilk Plus testsuite needs massive cleanup (PR testsuite/70595)

2016-06-14 Thread Ilya Verbin
On Fri, Apr 29, 2016 at 11:19:47 -0700, Mike Stump wrote: > On Apr 29, 2016, at 5:41 AM, Rainer Orth > wrote: > > diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h > > --- a/gcc/config/darwin.h > > +++ b/gcc/config/darwin.h > > @@ -179,6 +179,7 @@ extern

Re: [PATCH, i386, AVX-512] Add vectorizer support builtins

2016-06-02 Thread Ilya Verbin
On Mon, May 23, 2016 at 19:11:53 +0300, Ilya Verbin wrote: > This patch adds missed 512-bit rounding builtins for vectorization. > Regtested on x86_64-linux and i686-linux. OK for trunk? > > gcc/ > * config/i386/i386-builtin-types.def: Add V16SI_FTYPE_V16SF, > V8D

[PATCH, i386, AVX-512] Add vectorizer support builtins

2016-05-23 Thread Ilya Verbin
Hi! This patch adds missed 512-bit rounding builtins for vectorization. Regtested on x86_64-linux and i686-linux. OK for trunk? gcc/ * config/i386/i386-builtin-types.def: Add V16SI_FTYPE_V16SF, V8DF_FTYPE_V8DF_ROUND, V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND. *

Re: [PATCH][Testsuite] Force testing of vectorized builtins rather than inlined i387 asm

2016-05-23 Thread Ilya Verbin
On Sat, May 21, 2016 at 09:51:36 +0200, Uros Bizjak wrote: > On Fri, May 20, 2016 at 8:01 PM, Ilya Verbin <iver...@gmail.com> wrote: > > In some cases the i387 version of a math function may be inlined from > > math.h, > > and the testcase (like gcc.target/i386/sse4_

[PATCH][Testsuite] Force testing of vectorized builtins rather than inlined i387 asm

2016-05-20 Thread Ilya Verbin
Hi! In some cases the i387 version of a math function may be inlined from math.h, and the testcase (like gcc.target/i386/sse4_1-ceil-vec.c) will actually test inlined asm instead of vectorized builtin. To fix this I've created a new file gcc.dg/mathfunc.h (similar to gcc.dg/strlenopt.h) and

Re: [PATCH][CilkPlus] Merge libcilkrts from upstream

2016-05-11 Thread Ilya Verbin
On Wed, May 11, 2016 at 10:47:49 +0100, Ramana Radhakrishnan wrote: > > > I've looked at the generated code in more details, and for armv6 this > > generates > > mcr p15, 0, r0, c7, c10, 5 > > which is not what __cilkrts_fence uses currently (CP15DSB vs CP15DMB) > > Wow I hadn't noticed

Re: [PATCH][CilkPlus] Allow parenthesized initialization in for-loops

2016-05-10 Thread Ilya Verbin
On Fri, Mar 25, 2016 at 18:23:23 +0300, Ilya Verbin wrote: > On Mon, Mar 21, 2016 at 15:58:18 +0100, Jakub Jelinek wrote: > > On Mon, Mar 21, 2016 at 05:45:52PM +0300, Ilya Verbin wrote: > > > www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_

Re: [PATCH][CilkPlus] Merge libcilkrts from upstream

2016-05-10 Thread Ilya Verbin
On Tue, May 10, 2016 at 14:36:36 +0100, Ramana Radhakrishnan wrote: > On Tue, May 10, 2016 at 2:02 PM, Christophe Lyon > wrote: > > On 9 May 2016 at 15:34, Christophe Lyon wrote: > >> On 9 May 2016 at 15:29, Jeff Law

Re: [PATCH][CilkPlus] Merge libcilkrts from upstream

2016-05-10 Thread Ilya Verbin
On Mon, May 09, 2016 at 11:39:51 +0200, Matthias Klose wrote: > >well, it breaks the build for many multilib configurations where multilib > >binaries cannot be run on the current environment, e.g. building x32 > >multilibs > >on a kernel which doesn't have x32 enabled. > > > >The reason is again

Re: [PATCH] Apply fix for PR68463 to RS6000

2016-05-10 Thread Ilya Verbin
On Tue, May 10, 2016 at 11:48:53 -0400, David Edelsohn wrote: > On Tue, May 10, 2016 at 11:39 AM, James Norris > wrote: > > The fix for PR68463 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68463) > > was missing code that prevented the fix from working on RS6000. The >

Re: Allow redefinition of libcilkrts debug macros

2016-04-29 Thread Ilya Verbin
Hi Rainer! On Fri, Apr 29, 2016 at 10:58:25 +0200, Rainer Orth wrote: > > On 04/26/2016 08:04 AM, Rainer Orth wrote: > >> When working on a couple of Cilk Plus issues lately (PRs target/60290, > >> target/68945), I noticed that you have to modify the libcilkplus sources > >> to enable various

Re: [PATCH][CilkPlus] Fix PR69363

2016-04-20 Thread Ilya Verbin
On Wed, Feb 17, 2016 at 15:46:00 +0100, Jakub Jelinek wrote: > On Wed, Feb 17, 2016 at 05:32:58PM +0300, Ilya Verbin wrote: > > This patch fixes <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69363> > > Bootstrap and make check passed. OK for... stage 1? > > Ok

Re: FW: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C

2016-03-29 Thread Ilya Verbin
On Tue, Mar 29, 2016 at 17:15:11 +0200, Thomas Schwinge wrote: > On Mon, 28 Mar 2016 19:40:22 +0300, Ilya Verbin <iver...@gmail.com> wrote: > > Do you plan to commit this patch? :) > > Well, I'm also still waiting for you guys to merge (via the upstream > Intel sources

Re: FW: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C

2016-03-28 Thread Ilya Verbin
Hi Thomas! Do you plan to commit this patch? :) On Mon, Sep 29, 2014 at 09:24:40 -0600, Jeff Law wrote: > On 09/29/14 08:26, Thomas Schwinge wrote: > >On Mon, 29 Sep 2014 13:58:31 +, "Tannenbaum, Barry M" > > wrote: > >>In a nutshell, add the following code to

Re: [PATCH][CilkPlus] Allow parenthesized initialization in for-loops

2016-03-25 Thread Ilya Verbin
On Mon, Mar 21, 2016 at 15:58:18 +0100, Jakub Jelinek wrote: > On Mon, Mar 21, 2016 at 05:45:52PM +0300, Ilya Verbin wrote: > > www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_1.2.htm > > says: > > In C++, the control variable shall be dec

[PATCH][CilkPlus] Allow parenthesized initialization in for-loops

2016-03-21 Thread Ilya Verbin
Hi! www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_1.2.htm says: In C++, the control variable shall be declared and initialized within the initialization clause of the _Cilk_for loop. The variable shall have automatic storage duration. The variable shall

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Ilya Verbin
On Mon, Feb 22, 2016 at 16:13:07 +0100, Thomas Schwinge wrote: > (..., and similar for others.) The if-exists spec function only works > for absolute paths (I have not researched, why?), so it won't locate the > files for relative -Bbuild-gcc/[...] prefixes, and linking will fail: > >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Ilya Verbin
On Wed, Feb 24, 2016 at 17:13:35 +0100, Thomas Schwinge wrote: > On Tue, 23 Feb 2016 08:37:07 +0100, Tom de Vries <tom_devr...@mentor.com> > wrote: > > On 22/02/16 19:07, Ilya Verbin wrote: > > > 2016-02-22 18:13 GMT+03:00 Thomas Schwinge<tho...@codesourcery.com>

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-22 Thread Ilya Verbin
2016-02-22 18:13 GMT+03:00 Thomas Schwinge <tho...@codesourcery.com>: > On Sat, 20 Feb 2016 13:54:20 +0300, Ilya Verbin <iver...@gmail.com> wrote: >> On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: >> > On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya V

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-20 Thread Ilya Verbin
On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: > On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya Verbin wrote: > > This patch adds crtoffload{begin,end}.o to all -fopenmp programs, if they > > exist. > > I couldn't think of a better solution... > > Tes

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2016-02-19 Thread Ilya Verbin
On Fri, Feb 19, 2016 at 20:41:58 +0100, Thomas Schwinge wrote: > Hi! > > On Thu, 2 Oct 2014 19:14:57 +0400, Ilya Verbin <iver...@gmail.com> wrote: > > With this patch lto-wrapper performs invocation of mkoffload tool for each > > offload target. This tool [..

Re: Partial Offloading (was: [hsa merge 07/10] IPA-HSA pass)

2016-02-17 Thread Ilya Verbin
On Thu, Jan 28, 2016 at 12:36:19 +0100, Thomas Schwinge wrote: > I made an attempt to capture the recent discussion (plus my own > ideas/understanding) in this new section: > . Please > change/extend, as required. Thanks for summarizing

Re: [PATCH][CilkPlus] Fix PR69363

2016-02-17 Thread Ilya Verbin
On Wed, Feb 17, 2016 at 16:28:34 +0100, Marek Polacek wrote: > On Wed, Feb 17, 2016 at 04:14:22PM +0100, Jakub Jelinek wrote: > > On Wed, Feb 17, 2016 at 04:11:44PM +0100, Marek Polacek wrote: > > > On Wed, Feb 17, 2016 at 06:08:14PM +0300, Ilya Verbin wrote: > > >

Re: [PATCH][CilkPlus] Fix PR69363

2016-02-17 Thread Ilya Verbin
On Wed, Feb 17, 2016 at 15:46:00 +0100, Jakub Jelinek wrote: > On Wed, Feb 17, 2016 at 05:32:58PM +0300, Ilya Verbin wrote: > > + && !SCALAR_FLOAT_TYPE_P (TREE_TYPE (t)) > > + && TREE_CODE (TREE_TYPE (t)) != POINTER_TYPE) > > +

[PATCH][CilkPlus] Fix PR69363

2016-02-17 Thread Ilya Verbin
Hi! This patch fixes Bootstrap and make check passed. OK for... stage 1? gcc/c-family/ PR c++/69363 * c-cilkplus.c (c_finish_cilk_clauses): Remove function. * c-common.h (c_finish_cilk_clauses): Remove declaration.

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-10 Thread Ilya Verbin
Hi! On Tue, Jan 19, 2016 at 16:32:13 +0300, Ilya Verbin wrote: > On Tue, Jan 19, 2016 at 10:36:28 +0100, Jakub Jelinek wrote: > > On Tue, Jan 19, 2016 at 09:57:01AM +0100, Richard Biener wrote: > > > On Mon, 18 Jan 2016, Ilya Verbin wrote: > > > > On Fri, Jan 15, 2

Re: [PING][PATCH] Mark symbols in offload tables with force_output in read_offload_tables

2016-02-08 Thread Ilya Verbin
On Mon, Feb 08, 2016 at 14:20:11 +0100, Tom de Vries wrote: > On 26/01/16 14:01, Ilya Verbin wrote: > >On Tue, Jan 26, 2016 at 13:21:57 +0100, Tom de Vries wrote: > >>On 25/01/16 14:27, Ilya Verbin wrote: > >>>On Tue, Jan 05, 2016 at 15:56:15 +0100, Tom de Vries wrot

Re: [PATCH, PR69607] Mark offload symbols as global in lto

2016-02-08 Thread Ilya Verbin
On Mon, Feb 08, 2016 at 14:00:00 +0100, Tom de Vries wrote: > when running libgomp.c testsuite with "-flto -flto-partition=1to1 > -fno-toplevel-reorder" we run into many compilation failures like this: > ... > /tmp/.ltrans0.ltrans.o:(.gnu.offload_funcs+0x1a0): undefined > reference to

Re: [PING][PATCH] Mark symbols in offload tables with force_output in read_offload_tables

2016-01-26 Thread Ilya Verbin
On Tue, Jan 26, 2016 at 13:21:57 +0100, Tom de Vries wrote: > On 25/01/16 14:27, Ilya Verbin wrote: > >On Tue, Jan 05, 2016 at 15:56:15 +0100, Tom de Vries wrote: > >>>diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c > >>>index 62e5454..cdaee41 100644 > >>

Re: [PING][PATCH] Mark symbols in offload tables with force_output in read_offload_tables

2016-01-25 Thread Ilya Verbin
Hi! On Tue, Jan 05, 2016 at 15:56:15 +0100, Tom de Vries wrote: > >diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c > >index 62e5454..cdaee41 100644 > >--- a/gcc/lto-cgraph.c > >+++ b/gcc/lto-cgraph.c > >@@ -1911,6 +1911,11 @@ input_offload_tables (void) > > tree fn_decl > >

Re: [hsa merge 07/10] IPA-HSA pass

2016-01-20 Thread Ilya Verbin
On Fri, Jan 15, 2016 at 21:05:47 +0300, Ilya Verbin wrote: > On Fri, Jan 15, 2016 at 17:45:22 +0100, Jakub Jelinek wrote: > > On Fri, Jan 15, 2016 at 07:38:14PM +0300, Ilya Verbin wrote: > > > On Fri, Jan 15, 2016 at 17:09:54 +0100, Jakub Jelinek wrote: > > > > On F

Re: [hsa merge 02/10] Modifications to libgomp proper

2016-01-20 Thread Ilya Verbin
On Wed, Jan 13, 2016 at 18:39:27 +0100, Martin Jambor wrote: > * task.c (GOMP_PLUGIN_target_task_completion): Free > firstprivate_copies. Also this change caused 3 fails on intelmicemul: FAIL: libgomp.c/target-32.c execution test FAIL: libgomp.c/target-33.c execution test FAIL:

Re: [hsa merge 02/10] Modifications to libgomp proper

2016-01-20 Thread Ilya Verbin
gt_vars, > } > > extern "C" void > -GOMP_OFFLOAD_run (int device, void *tgt_fn, void *tgt_vars) > +GOMP_OFFLOAD_run (int device, void *tgt_fn, void *tgt_vars, void **) > { >TRACE ("(device = %d, tgt_fn = %p, tgt_vars = %p)", device, tgt_fn, &

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-19 Thread Ilya Verbin
On Tue, Jan 19, 2016 at 10:36:28 +0100, Jakub Jelinek wrote: > On Tue, Jan 19, 2016 at 09:57:01AM +0100, Richard Biener wrote: > > On Mon, 18 Jan 2016, Ilya Verbin wrote: > > > On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > > > > On Fri,

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-18 Thread Ilya Verbin
On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > On Fri, 15 Jan 2016, Ilya Verbin wrote: > > II) The __offload_func_table, __offload_funcs_end, __offload_var_table, > > __offload_vars_end are now provided by the linker script, instead of > > crtoffload{begi

Re: [hsa merge 07/10] IPA-HSA pass

2016-01-15 Thread Ilya Verbin
On Fri, Jan 15, 2016 at 17:09:54 +0100, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 05:02:34PM +0100, Martin Jambor wrote: > > How do other accelerators cope with the situation when half of the > > application is compiled with the accelerator disabled? (Would some of > > their calls to

Re: [hsa merge 07/10] IPA-HSA pass

2016-01-15 Thread Ilya Verbin
On Fri, Jan 15, 2016 at 17:45:22 +0100, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 07:38:14PM +0300, Ilya Verbin wrote: > > On Fri, Jan 15, 2016 at 17:09:54 +0100, Jakub Jelinek wrote: > > > On Fri, Jan 15, 2016 at 05:02:34PM +0100, Martin Jambor wrote: > > > >

[PATCH][RFC][Offloading] Fix PR68463

2016-01-14 Thread Ilya Verbin
Hi! Here is my attempt to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68463 This patch does 2 things: I) lto-plugin doesn't claim files which contain offload sections, but don't contain LTO sections. Instead, it writes names of files with offloading to the temporary file and passes it to

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-14 Thread Ilya Verbin
On Mon, Nov 30, 2015 at 21:49:02 +0100, Jakub Jelinek wrote: > On Mon, Nov 30, 2015 at 11:29:34PM +0300, Ilya Verbin wrote: > > > This looks wrong, both of these clearly could affect anything with > > > DECL_HAS_VALUE_EXPR_P, not just the link vars. > > > So, if you n

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-14 Thread Ilya Verbin
On Fri, Dec 11, 2015 at 18:27:13 +0100, Jakub Jelinek wrote: > On Tue, Dec 08, 2015 at 05:45:59PM +0300, Ilya Verbin wrote: > > @@ -356,6 +361,11 @@ gomp_map_vars (struct gomp_device_descr *devicep, > > size_t mapnum, > > } > > > >gomp_mutex_lock (

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-11 Thread Ilya Verbin
On Fri, Dec 11, 2015 at 18:27:13 +0100, Jakub Jelinek wrote: > On Tue, Dec 08, 2015 at 05:45:59PM +0300, Ilya Verbin wrote: > > --- a/libgomp/oacc-init.c > > +++ b/libgomp/oacc-init.c > > @@ -306,10 +306,11 @@ acc_shutdown_1 (acc_device_t d) > > { > >

Re: [6/6] OpenMP 4.0 library testsuite

2015-12-08 Thread Ilya Verbin
Hi! On Tue, Oct 08, 2013 at 21:54:47 +0200, Jakub Jelinek wrote: > * testsuite/libgomp.c++/udr-1.C: New test. > * testsuite/libgomp.c++/udr-3.C: New test. > * testsuite/libgomp.c++/udr-9.C: New test. I've just noticed that these tests fail fith -flto (on latest trunk and on Oct

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-08 Thread Ilya Verbin
On Tue, Dec 01, 2015 at 20:05:04 +0100, Jakub Jelinek wrote: > This is racy, tsan would tell you so. > Instead of a global var, I'd just change the devicep->is_initialized > field from bool into a 3 state field (perhaps enum), with states > uninitialized, initialized, finalized, and then say in

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-01 Thread Ilya Verbin
On Tue, Dec 01, 2015 at 14:15:59 +0100, Jakub Jelinek wrote: > On Tue, Dec 01, 2015 at 11:48:51AM +0300, Ilya Verbin wrote: > > > On 01 Dec 2015, at 11:18, Jakub Jelinek <ja...@redhat.com> wrote: > > >> On Mon, Nov 30, 2015 at 11:55:20PM +0300, Ilya Verbin wrote: &

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-01 Thread Ilya Verbin
> On 01 Dec 2015, at 11:18, Jakub Jelinek <ja...@redhat.com> wrote: > >> On Mon, Nov 30, 2015 at 11:55:20PM +0300, Ilya Verbin wrote: >> Ok, but it doesn't solve the issue with doing it for the executable, because >> gomp_unmap_tgt (n->tgt) will want to run

Re: [gomp4.5] Handle #pragma omp declare target link

2015-11-30 Thread Ilya Verbin
On Mon, Nov 30, 2015 at 13:04:59 +0100, Jakub Jelinek wrote: > On Fri, Nov 27, 2015 at 07:50:09PM +0300, Ilya Verbin wrote: > > + /* Most significant bit of the size marks such vars. */ > > + unsigned HOST_WIDE_INT isize = tree_to_uhwi (size); > > + isize |= 1ULL

Re: [gomp4.5] Handle #pragma omp declare target link

2015-11-30 Thread Ilya Verbin
On Mon, Nov 30, 2015 at 21:49:02 +0100, Jakub Jelinek wrote: > On Mon, Nov 30, 2015 at 11:29:34PM +0300, Ilya Verbin wrote: > > You're right, it doesn't deallocate memory on the device if DSO leaves > > nonzero > > refcount. And currently host compiler doesn't set

Re: [RFC] Getting LTO incremental linking work

2015-11-28 Thread Ilya Verbin
2015-11-28 14:01 GMT+03:00 Tom de Vries : > This patch fixes the failures. I'm not sure if this is the right or complete > fix though. I think it's ok, at least until we decide how to rework the offloading stuff in lto-wrapper (see PR68463). Thanks, -- Ilya

Re: [gomp4.5] Handle #pragma omp declare target link

2015-11-27 Thread Ilya Verbin
On Thu, Nov 19, 2015 at 16:31:15 +0100, Jakub Jelinek wrote: > On Mon, Nov 16, 2015 at 06:40:43PM +0300, Ilya Verbin wrote: > > @@ -2009,7 +2010,8 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) > > decl = OMP_CLAUSE_DECL (c); > > /* Global variables wit

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Ilya Verbin
On Mon, Nov 23, 2015 at 16:31:42 +0100, Richard Biener wrote: > I think it also causes the following and one related ICE > > FAIL: gcc.dg/vect/pr62021.c -flto -ffat-lto-objects (internal compiler > error) > > /space/rguenther/src/svn/trunk3/gcc/testsuite/gcc.dg/vect/pr62021.c:7:1: > internal

Re: [PATCH 12/12] always define ENABLE_OFFLOADING

2015-11-23 Thread Ilya Verbin
On Mon, Nov 09, 2015 at 19:41:21 +0100, Bernd Schmidt wrote: > On 11/09/2015 05:47 PM, tbsaunde+...@tbsaunde.org wrote: > >-#ifdef ENABLE_OFFLOADING > >/* If the user didn't specify any, default to all configured offload > > targets. */ > >if (offload_targets == NULL) > >

Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling

2015-11-20 Thread Ilya Verbin
On Wed, Dec 10, 2014 at 01:48:21 +0300, Ilya Verbin wrote: > On 09 Dec 14:59, Richard Biener wrote: > > On Mon, 8 Dec 2014, Ilya Verbin wrote: > > > Unfortunately, this fix was not general enough. > > > There might be cases when mixed object files get into lto-wrapper, i

Re: [PATCH] Implement GOMP_OFFLOAD_unload_image in intelmic plugin

2015-11-19 Thread Ilya Verbin
On Thu, Nov 19, 2015 at 14:33:06 +0100, Jakub Jelinek wrote: > On Mon, Nov 16, 2015 at 08:33:28PM +0300, Ilya Verbin wrote: > > diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp > > b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp > > index 77

Re: [gomp4.1] Handle linear clause modifiers in declare simd

2015-11-18 Thread Ilya Verbin
Hi! On Wed, Jul 01, 2015 at 12:55:38 +0200, Jakub Jelinek wrote: > I've committed following patch, which per the new ABI additions > mangles and handles the various new linear clause modifiers in > declare simd functions. The vectorizer side is not done yet, > > [...] > > @@ -14195,12 +14216,25

Re: libgomp: Compile-time error for non-portable gomp_mutex_t initialization

2015-11-18 Thread Ilya Verbin
On Fri, Sep 25, 2015 at 17:28:25 +0200, Jakub Jelinek wrote: > On Fri, Sep 25, 2015 at 05:04:47PM +0200, Thomas Schwinge wrote: > > On Thu, 26 Mar 2015 23:41:30 +0300, Ilya Verbin <iver...@gmail.com> wrote: > > > On Thu, Mar 26, 2015 at 13:09:19 +0100, Jakub Jelinek wrote:

[gomp4.5] Handle #pragma omp declare target link

2015-11-16 Thread Ilya Verbin
Hi! On Mon, Oct 26, 2015 at 20:49:40 +0100, Jakub Jelinek wrote: > On Mon, Oct 26, 2015 at 10:39:04PM +0300, Ilya Verbin wrote: > > > Without declare target link or to, you can't use the global variables > > > in orphaned accelerated routines (unless you e.g. take the addres

Re: [PATCH] Implement GOMP_OFFLOAD_unload_image in intelmic plugin

2015-11-16 Thread Ilya Verbin
On Tue, Sep 08, 2015 at 22:41:17 +0300, Ilya Verbin wrote: > This patch supports unloading of target images from the device. > Unfortunately __offload_unregister_image requires the whole descriptor for > unloading, which must contain target code inside, for this reason the plugi

Re: [gomp4.5] depend nowait support for target

2015-11-13 Thread Ilya Verbin
On Fri, Nov 13, 2015 at 16:11:50 +0100, Jakub Jelinek wrote: > On Fri, Nov 13, 2015 at 11:18:41AM +0100, Jakub Jelinek wrote: > > For the offloading case, I actually see a problematic spot, namely that > > GOMP_PLUGIN_target_task_completion could finish too early, and get the > > task_lock before

Re: [gomp4.5] depend nowait support for target

2015-11-13 Thread Ilya Verbin
On Fri, Nov 13, 2015 at 17:41:53 +0100, Jakub Jelinek wrote: > On Fri, Nov 13, 2015 at 07:37:17PM +0300, Ilya Verbin wrote: > > I don't know which interface to implement to maintain compatibility in the > > future. > > Anyway, currently it's impossible that a proc

Re: [gomp4.5] depend nowait support for target

2015-11-12 Thread Ilya Verbin
On Thu, Nov 12, 2015 at 18:45:09 +0100, Jakub Jelinek wrote: > But the testcase I wrote (target-33.c) hangs, the problem is in the > #pragma omp target nowait map (tofrom: a, b) depend(out: d[3]) > { > #pragma omp atomic update > a = a + 9; > b -= 8; > } > #pragma omp target

Re: [gomp4.5] depend nowait support for target

2015-11-12 Thread Ilya Verbin
On Thu, Nov 12, 2015 at 18:58:22 +0100, Jakub Jelinek wrote: > > Unfortunately, target-32.c fails for me using emulation mode: > > I haven't managed to get it stuck yet (unlike the target-33.c one, see > another mail), what OMP_NUM_THREADS you are using > and how many cores/threads?

Re: [gomp4.5] depend nowait support for target

2015-11-12 Thread Ilya Verbin
On Wed, Nov 11, 2015 at 17:52:22 +0100, Jakub Jelinek wrote: > On Mon, Oct 19, 2015 at 10:47:54PM +0300, Ilya Verbin wrote: > > So, here is what I have for now. Attached target-29.c testcase works fine > > with > > MIC emul, however I don't know how to (and

Re: [ptx] partitioning optimization

2015-11-10 Thread Ilya Verbin
> I've been unable to introduce a testcase for this. The difficulty is we want > to check an rtl dump from the acceleration compiler, and there doesn't > appear to be existing machinery for that in the testsuite. Perhaps > something to be added later? I haven't tried it, but doesn't /* {

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-11-02 Thread Ilya Verbin
On Fri, Oct 30, 2015 at 20:12:25 +0100, Jakub Jelinek wrote: > On Fri, Oct 30, 2015 at 08:44:07PM +0300, Ilya Verbin wrote: > > On Wed, Oct 28, 2015 at 00:11:03 +0300, Ilya Verbin wrote: > > > On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > > > > As t

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-10-30 Thread Ilya Verbin
On Wed, Oct 28, 2015 at 00:11:03 +0300, Ilya Verbin wrote: > On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > > As the testcases show, #pragma omp declare target has now a new form (well, > > two; with some issues on it pending), where it is used just as a single

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-10-27 Thread Ilya Verbin
On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > As the testcases show, #pragma omp declare target has now a new form (well, > two; with some issues on it pending), where it is used just as a single > declarative directive rather than a pair of them and allows marking > vars and

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-10-26 Thread Ilya Verbin
On Mon, Oct 26, 2015 at 20:05:39 +0100, Jakub Jelinek wrote: > On Mon, Oct 26, 2015 at 09:35:52PM +0300, Ilya Verbin wrote: > > On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > > > As the testcases show, #pragma omp declare target has now a new form > > >

Re: [gomp4.1] map clause parsing improvements

2015-10-26 Thread Ilya Verbin
On Mon, Oct 26, 2015 at 14:07:13 +0100, Jakub Jelinek wrote: > On Mon, Oct 26, 2015 at 03:53:57PM +0300, Ilya Verbin wrote: > > @@ -7363,7 +7363,7 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, tree > > *list_p, > > n = splay_tree_lookup (ctx->variable

Re: [PATCH 0/4] OpenMP 4.0 offloading to Intel MIC

2015-10-26 Thread Ilya Verbin
On Fri, Oct 23, 2015 at 10:10:06 +0200, Jakub Jelinek wrote: > On Thu, Oct 22, 2015 at 09:26:37PM +0300, Ilya Verbin wrote: > > On Mon, Dec 22, 2014 at 13:01:40 +0100, Thomas Schwinge wrote: > > > By chance (when tracking down a different problem), I've found the > > > f

Re: [gomp4.1] map clause parsing improvements

2015-10-26 Thread Ilya Verbin
On Tue, Oct 20, 2015 at 12:03:40 +0200, Jakub Jelinek wrote: > On Mon, Oct 19, 2015 at 05:00:33PM +0200, Thomas Schwinge wrote: > > n = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); > > if ((ctx->region_type & ORT_TARGET) != 0 > > &&

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-10-26 Thread Ilya Verbin
On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > As the testcases show, #pragma omp declare target has now a new form (well, > two; with some issues on it pending), where it is used just as a single > declarative directive rather than a pair of them and allows marking > vars and

Re: [PATCH 0/4] OpenMP 4.0 offloading to Intel MIC

2015-10-22 Thread Ilya Verbin
On Mon, Dec 22, 2014 at 13:01:40 +0100, Thomas Schwinge wrote: > By chance (when tracking down a different problem), I've found the > following. Would you please check whether that's a real problem in > liboffloadmic, or its libgomp plugin, or just a mis-diagnosis by > Valgrind? > >

Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin <iver...@gmail.com> wrote: > > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin <iver...@gmail.com> wr

Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Thu, Oct 22, 2015 at 07:35:55 -0700, H.J. Lu wrote: > On Thu, Oct 22, 2015 at 7:11 AM, Ilya Verbin <iver...@gmail.com> wrote: > > On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin <iver...@gmail.com> wrot

Re: Constify host-side offload data`

2015-10-21 Thread Ilya Verbin
Hi! On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: > --- libgcc/offloadstuff.c (revision 225851) > +++ libgcc/offloadstuff.c (working copy) > ... > -void *__offload_func_table[0] > +const void *const __offload_func_table[0] > ... > -void *__offload_var_table[0] > +const

Re: Constify host-side offload data`

2015-10-21 Thread Ilya Verbin
On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin <iver...@gmail.com> wrote: > > H.J., > > Maybe linker should print some warning about joining writable + nonwritable > > sections? Here is a simple testcase: >

Re: [OpenACC 11/11] execution tests

2015-10-21 Thread Ilya Verbin
> On 21 Oct 2015, at 22:53, Nathan Sidwell wrote: > > This patch has some new execution tests, verifying loop partitioning is > behaving as expected. > > There are more execution tests on the gomp4 branch, but many of them use > reductions. We'll merge those once reductions

Re: [gomp4] lto error message

2015-10-20 Thread Ilya Verbin
On Tue, Oct 20, 2015 at 15:54:45 -0400, Nathan Sidwell wrote: > @@ -1209,16 +1209,11 @@ input_overwrite_node (struct lto_file_de > >if (!success) > { > - if (flag_openacc) > - { > - if (TREE_CODE (node->decl) == FUNCTION_DECL) > - error ("Missing routine function

Re: [gomp4.1] depend nowait support for target {update,{enter,exit} data}

2015-10-19 Thread Ilya Verbin
On Thu, Oct 15, 2015 at 16:01:56 +0200, Jakub Jelinek wrote: > >void *fn_addr = gomp_get_target_fn_addr (devicep, fn); > > > > + if (flags & GOMP_TARGET_FLAG_NOWAIT) > > +{ > > + gomp_create_target_task (devicep, fn_addr, mapnum, hostaddrs, sizes, > > +

Re: OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-19 Thread Ilya Verbin
On Mon, Oct 19, 2015 at 18:24:35 +0200, Thomas Schwinge wrote: > Chung-Lin, would you please have a look at the following (on > gomp-4_0-branch)? Also, anyone else got any ideas off-hand? > > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-2.c > -DACC_DEVICE_TYPE_nvidia=1

Re: [gomp4.1] depend nowait support for target {update,{enter,exit} data}

2015-10-15 Thread Ilya Verbin
On Thu, Oct 15, 2015 at 16:01:56 +0200, Jakub Jelinek wrote: > On Fri, Oct 02, 2015 at 10:28:01PM +0300, Ilya Verbin wrote: > > Here is my WIP patch. target.c part is obviously incorrect, but it > > demonstrates > > a possible libgomp <-> plugin interface for run

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-10-13 Thread Ilya Verbin
On Mon, Jun 15, 2015 at 22:48:50 +0300, Ilya Verbin wrote: > @@ -950,50 +997,41 @@ GOMP_target (int device, void (*fn) (void *), const > void *unused, > ... > + devicep->run_func (devicep->target_id, fn_addr, (void *) > tgt_vars->tgt_start); If mapnum is 0, tgt_vars->

Re: libgomp: Guard all devices/num_devices/num_devices_openmp access by register_lock

2015-10-09 Thread Ilya Verbin
On Fri, Oct 09, 2015 at 13:58:32 +0200, Bernd Schmidt wrote: > One oddity I noticed in target.c is that there are two different num_devices > variables: > > /* Total number of available devices. */ > static int num_devices; > > /* Number of GOMP_OFFLOAD_CAP_OPENMP_400 devices. */ >

Re: [gomp4.1] OpenMP 4.1 is dead, long live OpenMP 4.5

2015-10-09 Thread Ilya Verbin
On Fri, Oct 09, 2015 at 09:55:07 +0200, Jakub Jelinek wrote: > -GOMP_4.1 { > +GOMP_4.5 { >global: > GOMP_target_41; > GOMP_target_data_41; Should we rename it to GOMP_target*_45, or do you know some more mnemonic name? -- Ilya

Re: [PATCH][committed] Fix PR67652: wrong sizeof calculation in liboffloadmic

2015-10-08 Thread Ilya Verbin
On Mon, Sep 28, 2015 at 18:15:14 +0200, Jakub Jelinek wrote: > > -char * env_var = (char*) > > malloc(sizeof("COI_DMA_CHANNEL_COUNT=2" + 1)); > > +char * env_var = (char*) > > malloc(sizeof("COI_DMA_CHANNEL_COUNT=2")); > > sprintf(env_var,

Re: [gomp4.1] depend nowait support for target {update,{enter,exit} data}

2015-10-02 Thread Ilya Verbin
Hi! On Tue, Sep 08, 2015 at 11:20:14 +0200, Jakub Jelinek wrote: > nowait support for #pragma omp target is not implemented yet, supposedly we > need to mark those somehow (some flag) already in the struct gomp_task > structure, essentially it will need either 2 or 3 callbacks > (the current one,

Re: [gomp4.1] Doacross tweaks

2015-09-30 Thread Ilya Verbin
Hi! On Fri, Sep 25, 2015 at 18:54:47 +0200, Jakub Jelinek wrote: > --- gcc/tree-pretty-print.c.jj2015-09-03 16:35:58.0 +0200 > +++ gcc/tree-pretty-print.c 2015-09-25 15:04:46.911844111 +0200 > @@ -569,7 +569,9 @@ dump_omp_clause (pretty_printer *pp, tre > if

Re: [PATCH] liboffloadmic emulation mode: make it asynchronous

2015-09-29 Thread Ilya Verbin
On Tue, Sep 29, 2015 at 09:01:33 +0200, Jakub Jelinek wrote: > On Mon, Sep 28, 2015 at 05:53:42PM +0300, Ilya Verbin wrote: > > Currently the COI emulator is single-threaded, i.e. it is able to run only > > one > > target function at a time, e.g. the following testcase: &

[PATCH] liboffloadmic emulation mode: make it asynchronous

2015-09-28 Thread Ilya Verbin
Hi! Currently the COI emulator is single-threaded, i.e. it is able to run only one target function at a time, e.g. the following testcase: #pragma omp parallel sections num_threads(2) { #pragma omp section #pragma omp target while (1) putchar ('.'); #pragma

[PATCH][committed] Fix PR67652: wrong sizeof calculation in liboffloadmic

2015-09-28 Thread Ilya Verbin
Committed to trunk as obvious. PR other/67652 * runtime/offload_engine.cpp (Engine::init_process): Fix sizeof. diff --git a/liboffloadmic/runtime/offload_engine.cpp b/liboffloadmic/runtime/offload_engine.cpp index 16b440d..00b673a 100644 ---

Re: [PATCH][committed] Fix PR67652: wrong sizeof calculation in liboffloadmic

2015-09-28 Thread Ilya Verbin
On Mon, Sep 28, 2015 at 18:15:14 +0200, Jakub Jelinek wrote: > On Mon, Sep 28, 2015 at 07:10:13PM +0300, Ilya Verbin wrote: > > Committed to trunk as obvious. > > > > PR other/67652 > > * runtime/offload_engine.cpp (Engine::init_process): Fix sizeof. > >

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-28 Thread Ilya Verbin
On Mon, Sep 28, 2015 at 12:09:19 +0200, Bernd Schmidt wrote: > On 09/28/2015 12:03 PM, Bernd Schmidt wrote: > >On 09/28/2015 10:26 AM, Thomas Schwinge wrote: > >>- objcopy_argv[8] = NULL; > >>+ objcopy_argv[objcopy_argc++] = NULL; > >>+ gcc_checking_assert (objcopy_argc <= OBJCOPY_ARGC_MAX); >

Re: libgomp: Guard all offload_images/num_offload_images access by register_lock (was: libgomp nvptx plugin: rework initialisation and support the proposed load/unload hooks)

2015-09-25 Thread Ilya Verbin
On Fri, Sep 25, 2015 at 18:21:27 +0200, Thomas Schwinge wrote: > On Thu, 26 Mar 2015 23:41:30 +0300, Ilya Verbin <iver...@gmail.com> wrote: > > On Thu, Mar 26, 2015 at 13:09:19 +0100, Jakub Jelinek wrote: > > > the current code is majorly broken. As I've said earlier, e.g.

  1   2   3   4   >