Re: [hsa merge 08/10] HSAIL BRIG description header file

2016-02-26 Thread Martin Jambor
Hi, I hope I've got some good news: On Thu, Jan 14, 2016 at 05:18:56PM -0800, Ian Lance Taylor wrote: > Jakub Jelinek writes: > > > On Wed, Jan 13, 2016 at 06:39:33PM +0100, Martin Jambor wrote: > >> the following patch adds a BRIG (binary representation of

Re: (Non-)offloading diagnostics

2016-02-26 Thread Martin Jambor
Hi, On Fri, Feb 26, 2016 at 06:51:34PM +0100, Jakub Jelinek wrote: > On Fri, Feb 26, 2016 at 06:18:13PM +0100, Martin Jambor wrote: > > > I'm a proponent of enabling as many useful warnings by default, or if not > > > by default, then with -Wall. -Whsa is enable

Re: (Non-)offloading diagnostics

2016-02-26 Thread Martin Jambor
; On Thu, 10 Dec 2015 18:51:48 +0100, Martin Jambor wrote: > > > On Mon, Dec 07, 2015 at 12:46:45PM +0100, Jakub Jelinek wrote: > > > > On Mon, Dec 07, 2015 at 12:17:58PM +0100, Martin Jambor wrote: > > > > > [...] There are no failing > > > >

[PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL

2016-02-26 Thread Martin Jambor
c-5 branch together with the PR 69666 fix a few days afterwards. OK? Thanks, Martin 2016-02-26 Martin Jambor PR middle-end/69920 * tree-sra.c (sra_modify_assign): Do not remove loads of uninitialized aggregates to SSA_NAMEs. testsuite/ * gcc.dg/torture/pr69932.c

[hsa,testsuite] New directory for HSA-specific C testcases

2016-02-26 Thread Martin Jambor
incorporate all feedback, I would of course like to commit this to trunk. Needless to say, the patch has been tested and works. Thanks, Martin 2016-02-22 Martin Jambor Martin Liska * testsuite/lib/libgomp.exp (check_hsa_offloading_available): New. * testsuite

[hsa,testsuite] Adjust libgomp tests that do not work on host fallback

2016-02-26 Thread Martin Jambor
e and generic way of doing that. However, all testcases for non-shared memory devices were written with disallowed fallback in mind and so this soulution also gives the desired result. Tested both with and without HSA (enabled or present). OK for trunk? Thanks, Martin 2016-02-12 Martin J

[hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-02-26 Thread Martin Jambor
ism way of executing stuff. Hopefully we'll be able to revert many of the hunks below when we get that working. The patch has been tested both with and without HSA enabled. OK for trunk? Thanks, Martin 2016-02-12 Martin Jambor * testsuite/libgomp.c++/examples-4/target_data-5.C:

[hsa, testsuite] Suppress hsa warnings in compiler gomp tests

2016-02-26 Thread Martin Jambor
which we could do it earlier, I can detect it and examine the issue. The explicit -Wno-hsa options are added by the patch below, which has been tested both with and without HSA. OK for trunk? Thanks, Martin 2016-02-12 Martin Jambor testsuite/ * c-c++-common/gomp/clauses-1.c: Add -Wno

[hsa,testsuite] Introduce offload_device_shared_as effective target

2016-02-26 Thread Martin Jambor
device with shared memory (this includes the host). Keith included a C++ test to illustrate the use. I have tested this thoroughly, both with and without HSA (enabled or present). OK for trunk? Thanks, Martin 2016-02-10 Keith McDaniel Martin Jambor * testsuite/lib

[hsa, testsuite] Gridification tests

2016-02-26 Thread Martin Jambor
gridification happens. Tested, both with and without HSA enabled. OK for trunk? Thanks, Martin 2016-02-10 Martin Jambor * target-supports.exp (check_effective_target_offload_hsa): New. * c-c++-common/gomp/gridify-1.c: New test. * gfortran.dg/gomp/gridify-1.f90: Likewise

[hsa/69568] Fix ld instruction type for packed data

2016-02-26 Thread Martin Jambor
). The patch below fulfills that requirement. I have bootstrapped and tested it and will commit it shortly. Thanks, Martin 2016-02-18 Martin Jambor PR hsa/69568 * hsa.h (hsa_type_packed_p): Declare. * hsa.c (hsa_type_packed_p): New function. * hsa-gen.c

[hsa/69674] Make testsuite libgomp.c/for-3.c compile with -m32

2016-02-26 Thread Martin Jambor
build libgomp plugin for it, but we should not ICE and the new code below is the correct way of doing things anyway. So I will commit it shortly, it has been included in a bootstrap/testsuite run. Thanks, Martin 2016-02-18 Martin Jambor pr hsa/69674 * hsa-gen.c

[hsa] Satisfy conditional move operand type constrains

2016-02-26 Thread Martin Jambor
hanks, Martin 2016-02-17 Martin Jambor * hsa.h (is_a_helper): New overload for hsa_op_immed for hsa_op_with_type operands. (hsa_unsigned_type_for_type): Declare. * hsa.c (hsa_unsigned_type_for_type): New function. * hsa-gen.c (gen_hsa_binary_operation)

[hsa] Fail in presence of atomic operations in private segment

2016-02-26 Thread Martin Jambor
n the compiler, because otherwise there is testcase in the libgomp testsuite that complains about the finalizer errors in the output of the execute test. Bootstrapped and tested, I'll commit it to trunk shortly. Thanks, Martin 2016-02-17 Martin Jambor *

[omp, hsa] Do not gridify simd constructs

2016-02-26 Thread Martin Jambor
e the body even though the explicit loop is missing, but that will also mean that the HSA grid size has to shrink appropriately. Bootstrapped and tested on x86_64-linux, with and without HSA enabled. OK for trunk? Thanks, Martin 2016-02-17 Martin Jambor * omp-

Re: [PATCH 1/4] Replace ENABLE_CHECKING macro with flag_checking in HSA

2016-02-25 Thread Martin Jambor
On Wed, Feb 24, 2016 at 02:59:11PM +0100, Martin Liska wrote: > gcc/ChangeLog: > > 2016-02-24 Martin Liska > > * hsa-gen.c (generate_hsa): Replace ENABLE_CHECKING macro > with flag_checking. > * hsa-regalloc.c (linear_scan_regalloc): Likewise. OK, thanks, Martin

Re: [pr 69666] No SRA default_def replacements for unscalarizable

2016-02-24 Thread Martin Jambor
On Tue, Feb 23, 2016 at 06:45:08AM -0800, H.J. Lu wrote: > On Fri, Feb 19, 2016 at 8:21 AM, Martin Jambor wrote: > > Hi, > > > > in PR 69666, SRA attempts to turn a load from an aggregate that is > > uninitialized into a load from a default definition SSA name (whi

[pr 69666] No SRA default_def replacements for unscalarizable

2016-02-19 Thread Martin Jambor
. Bootstrapped and tested on x86_64, OK for trunk and later for the 5 branch? Thanks, Martin 2016-02-19 Martin Jambor PR tree-optimization/69666 * tree-sra.c (sra_modify_assign): Do not attempt to create defaut_def replacements for unscalarizable regions. testsuite

Re: [PATCH] Add debug_function_graph_to_file

2016-02-18 Thread Martin Jambor
On Wed, Feb 17, 2016 at 03:00:00PM +0100, Richard Biener wrote: > On Wed, Feb 17, 2016 at 2:51 PM, Marek Polacek wrote: > > On Wed, Feb 17, 2016 at 02:45:36PM +0100, Richard Biener wrote: > >> OTOH I have in my local trees a more convenient form (attached). > >> > >> (gdb) call debug_dot_cfg (cfun

[hsa branch] Map collapse(2) and collapse(3) to HSA grid dimensions

2016-02-02 Thread Martin Jambor
are small because as I was restructuring the code, I was moving it in this direction for some time already. Committed to the branch (a few days ago actually, sorry for that). Thanks, Martin 2016-01-26 Martin Jambor gcc/ * Makefile.in (BUILTINS_DEF): Add hsa-builtins.def

Re: [hsa merge 00/10] Merge of HSA branch

2016-02-02 Thread Martin Jambor
@@ News + Heterogeneous Systems Architecture support + [2016-01-27] + http://www.hsafoundation.com/";> Heterogeneous Systems + Architecture 1.0 https://gcc.gnu.org/gcc-6/changes.html#hsa";> + support was added to GCC, contributed by Martin Jambor, Martin Liška + and Michael M

[hsa] Atomic assess memory model fixes

2016-01-29 Thread Martin Jambor
it trunk even at this stage, even though of course nothing in HSA is a regression. Thanks, Martin 2016-01-29 Martin Jambor * hsa-gen.c (get_memory_order_name): Mask with MEMMODEL_BASE_MASK. Use short lowercase names. (get_memory_order): Mask with MEMMODEL_BASE_MASK

Re: Martin Jambor appointed HSA Maintainer

2016-01-29 Thread Martin Jambor
Hi, On Fri, Dec 18, 2015 at 08:41:41AM -0500, David Edelsohn wrote: > I am pleased to announce that the GCC Steering Committee has > appointed Martin Jambor as HSA maintainer. > > Please join me in congratulating Martin on his new role. > Martin, please update your

Re: [hsa merge 00/10] Merge of HSA branch

2016-01-27 Thread Martin Jambor
ous Systems Architecture support in GCC + [2016-01-27] + http://www.hsafoundation.com/";> Heterogeneous Systems + Architecture 1.0 https://gcc.gnu.org/gcc-6/changes.html#hsa";> + support was added to GCC. Contributed by Martin Jambor, Martin Liška + and Michael Matz f

Re: [gomp4] Un-parallelized OpenACC kernels constructs with nvptx offloading: "avoid offloading"

2016-01-26 Thread Martin Jambor
On Fri, Jan 22, 2016 at 02:18:38PM +0100, Bernd Schmidt wrote: > On 01/22/2016 09:36 AM, Jakub Jelinek wrote: > > > >I think it is a bad idea to go against what the user wrote. Warning that > >some code might not be efficient? Perhaps (if properly guarded with some > >warning option one can turn

[PR 69355] Correct hole detection when total_scalarization fails

2016-01-26 Thread Martin Jambor
unscalarized data). Bootstrapped and tested on x86_64-linux. OK for trunk? And the gcc-5 branch? Thanks, Martin 2016-01-26 Martin Jambor PR tree-optimization/69355 * tree-sra.c (analyze_access_subtree): Correct hole detection when total_scalarization fails

Re: [hsa merge 00/10] Merge of HSA branch

2016-01-19 Thread Martin Jambor
Hi, On Wed, Jan 13, 2016 at 06:39:25PM +0100, Martin Jambor wrote: > Hi, > > this is hopefully the last big re-post of the HSA patches... I have committed the combined patch as revision 232549 after bootstrapping and testing all languages on x86_64-linux and i686-linux and verifying

Re: [hsa merge 09/10] Majority of the HSA back-end

2016-01-18 Thread Martin Jambor
Hi, On Sat, Jan 16, 2016 at 09:58:51AM +0100, Jakub Jelinek wrote: > On Sat, Jan 16, 2016 at 12:49:12AM +0100, Martin Jambor wrote: > > bootstrapping on i686-linux revealed the need for the following simple > > patch. I've run into two types of compilation errors on >

Re: [hsa merge 08/10] HSAIL BRIG description header file

2016-01-18 Thread Martin Jambor
Hi, On Sat, Jan 16, 2016 at 12:43:07PM +0100, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 06:23:05PM +0100, Martin Jambor wrote: > > BRIG_KIND_OPERAND_REGISTER = 0x300a, > > BRIG_KIND_OPERAND_STRING = 0x300b, > > BRIG_KIND_OPERAND_WAVESIZE = 0x3009c, > > BRI

Re: [hsa merge 09/10] Majority of the HSA back-end

2016-01-15 Thread Martin Jambor
ickly by making most of the contents of hsa-*.c files compiled only conditionally (and leave potential hsa support on non-linux platforms for later), but I will not have time to do the change and test it properly until Monday. But that will hopefully really be it, Martin 2016-01-16 Martin J

Re: [hsa merge 08/10] HSAIL BRIG description header file

2016-01-15 Thread Martin Jambor
On Fri, Jan 15, 2016 at 01:03:35PM +0100, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 11:37:32AM +0100, Jakub Jelinek wrote: > > On Fri, Jan 15, 2016 at 11:14:33AM +0100, Martin Jambor wrote: > > > > Martin, could you ask the HSA Foundation or AMD or whoever if there is

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

2016-01-15 Thread Martin Jambor
Hi, On Fri, Jan 15, 2016 at 04:01:49PM +0100, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 03:53:23PM +0100, Martin Jambor wrote: > > @@ -317,7 +319,7 @@ public: > > bool > > pass_ipa_hsa::gate (function *) > > { > > - return hsa_gen_requeste

Re: [hsa merge 10/10] HSA register allocator

2016-01-15 Thread Martin Jambor
Hi, On Thu, Jan 14, 2016 at 03:41:34PM +0100, Jakub Jelinek wrote: > On Wed, Jan 13, 2016 at 06:39:35PM +0100, Martin Jambor wrote: > > +for (phi = hbb->m_first_phi; > > +phi; > > +phi = phi->m_next ? as_a (phi->m_next): NULL) > > Space before :

Re: [hsa merge 09/10] Majority of the HSA back-end

2016-01-15 Thread Martin Jambor
s. Let me just quickly answer two comments as well: On Thu, Jan 14, 2016 at 03:05:33PM +0100, Jakub Jelinek wrote: > On Wed, Jan 13, 2016 at 06:39:34PM +0100, Martin Jambor wrote: > ... > > +#define HSA_WARN_MEMORY_ROUTINE "OpenMP device memory library routines > > have "

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

2016-01-15 Thread Martin Jambor
On Thu, Jan 14, 2016 at 01:58:58PM +0100, Jakub Jelinek wrote: > Otherwise LGTM. > > Jakub Thanks Jakub, I have committed the following patch from Martin Liska that addresses your comments. Martin 2016-01-15 Martin Liska * ipa-hsa.c (process_hsa_functions): Fixed coding style.

Re: [hsa merge 05/10] OpenMP lowering/expansion changes (gridification)

2016-01-15 Thread Martin Jambor
Thanks Jakub and Alex, I have committed the following to the branch to address your comments: 2016-01-15 Martin Jambor * gimple.h: Fixed comment of gimple_statement_omp_single_layout * omp-low.c (get_target_argument_value): Fixed spelling in its comment

Re: [hsa merge 08/10] HSAIL BRIG description header file

2016-01-15 Thread Martin Jambor
Hi, On Thu, Jan 14, 2016 at 05:18:56PM -0800, Ian Lance Taylor wrote: > Jakub Jelinek writes: > > > On Wed, Jan 13, 2016 at 06:39:33PM +0100, Martin Jambor wrote: > >> the following patch adds a BRIG (binary representation of HSAIL) > >> representation description.

[hsa merge 05/10] OpenMP lowering/expansion changes (gridification)

2016-01-13 Thread Martin Jambor
all of which has been posted in https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01884.html. Thanks, Martin 2016-01-13 Martin Jambor gcc/ * builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed

[hsa merge 08/10] HSAIL BRIG description header file

2016-01-13 Thread Martin Jambor
jections against HSA going forward, including this file. Thanks, Martin 2015-12-04 Martin Jambor * hsa-brig-format.h: New file. diff --git a/gcc/hsa-brig-format.h b/gcc/hsa-brig-format.h new file mode 100644 index 000..6e2fe75 --- /dev/null +++ b/gcc/hsa-brig-format.h @@ -0,0 +1,12

[hsa merge 10/10] HSA register allocator

2016-01-13 Thread Martin Jambor
2016-01-13 Michael Matz Martin Jambor * hsa-regalloc.c: New file. diff --git a/gcc/hsa-regalloc.c b/gcc/hsa-regalloc.c new file mode 100644 index 000..5a42beb --- /dev/null +++ b/gcc/hsa-regalloc.c @@ -0,0 +1,719 @@ +/* HSAIL IL Register allocation and out-of-SSA

[hsa merge 04/10] Avoid extraneous remapping in copy_gimple_seq_and_replace_locals

2016-01-13 Thread Martin Jambor
tree-inline.h as I think that such a cleanup should be done separately, but the structure could probably use some field-re ordering to remove padding. I hope I have grasped it correctly and that the patch is OK for trunk. Thanks, Martin 2016-01-13 Martin Jambor * tree-inl

[hsa merge 03/10] HSA libgomp plugin

2016-01-13 Thread Martin Jambor
-12/msg00716.html with a number of modifications requested by Jakub. Thanks, Martin 2016-01-13 Martin Jambor Martin Liska * plugin/plugin-hsa.c: New file. diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c new file mode 100644 index 000..d888493

[hsa merge 07/10] IPA-HSA pass

2016-01-13 Thread Martin Jambor
e same LTO partition so that they can b registered together to libgomp. Thanks, Martin 2016-01-13 Martin Liska Martin Jambor * ipa-hsa.c: New file. * lto-section-in.c (lto_section_name): Add hsa section name. * lto-streamer.h (lto_section_type): Add h

[hsa merge 02/10] Modifications to libgomp proper

2016-01-13 Thread Martin Jambor
communications with Jakub, I have the feeling he is fine with the changes. But perhaps he or someone else would like to have one more look. Thanks, Martin 2016-01-13 Martin Jambor include/ * gomp-constants.h (GOMP_DEVICE_HSA): New macro. (GOMP_VERSION_HSA): Likewise

[hsa merge 00/10] Merge of HSA branch

2016-01-13 Thread Martin Jambor
Hi, this is hopefully the last big re-post of the HSA patches. We have incorporated all the feedback and found and fixed a couple more bugs. The complete patch-set bootstraps and tests fine on an x86_64-linux, when you do not enable HSA, there are a few expected warnings when HSA is enabled which

[hsa merge 06/10] Pass manager changes

2016-01-13 Thread Martin Jambor
Hi, the pass manager changes required for HSA have already been committed to trunk so all that remains are these additions to the pass pipeline. This bit has already been approved by Richi in https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00996.html Thanks, Martin 2016-01-13 Martin Jambor

[hsa merge 01/10] Configury changes and new options

2016-01-13 Thread Martin Jambor
/gcc-patches/2015-12/msg01284.html). thanks, Martin 2016-01-13 Martin Jambor * Makefile.in (OBJS): Add new source files. (GTFILES): Add hsa.c. * common.opt (disable_hsa): New variable. (-Whsa): New warning. * config.in (ENABLE_HSA): New

Re: [hsa 2/10] Modifications to libgomp proper

2016-01-12 Thread Martin Jambor
Hi, On Tue, Jan 12, 2016 at 02:38:15PM +0100, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 02:29:06PM +0100, Martin Jambor wrote: > > GOMP_kernel_launch_attributes should not be there (it is a > > reminiscence from before the device-specific target arguments) and > > should

Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals

2016-01-12 Thread Martin Jambor
On Tue, Jan 12, 2016 at 06:36:21PM +0100, Martin Jambor wrote: > > remap_decl (old_var, id); > > } > > - phase 2 - do the full remap_decls, but during that arrange that > > remap_decl for non-zero id->remapping_type_depth if (!n) just returns > > decl

Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals

2016-01-12 Thread Martin Jambor
Hi, On Mon, Jan 11, 2016 at 05:38:47PM +0100, Jakub Jelinek wrote: > On Mon, Jan 11, 2016 at 09:41:31AM +0100, Richard Biener wrote: > > Hum. Can't you check id->remapping_type_depth? For some reason, last week I reached the conclusion that no. But I must have done something wrong because I hav

Re: [hsa 2/10] Modifications to libgomp proper

2016-01-12 Thread Martin Jambor
Hi, On Fri, Dec 11, 2015 at 07:05:29PM +0100, Jakub Jelinek wrote: > On Thu, Dec 10, 2015 at 06:52:23PM +0100, Martin Jambor wrote: > > > > --- a/libgomp/task.c > > > > +++ b/libgomp/task.c > > > > @@ -581,6 +581,7 @@ GOMP_PL

[PR 69044] Do not clone for parameter removal when !can_change_signature

2016-01-08 Thread Martin Jambor
2016-01-08 Martin Jambor PR ipa/69044 * ipa-cp.c (estimate_local_effects): Do not clone for removal of useless parameters if we cannot change function signature. testsuite/ * gcc.target/i386/chkp-pr69044.c: New test. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index

[PR ipa/66616] Fix artificial thunk ABI issues

2016-01-08 Thread Martin Jambor
passed bootstrap and testing on i686-linux, I have also included it in a bootstrap and testing that is underway on x86_64-linux. OK if it passes there as well? Thanks, Martin [PR ipa/66616] Copy can_change_signature flag to artificial thunks 2016-01-07 Martin Jambor PR ipa/66616

[patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals

2016-01-08 Thread Martin Jambor
found any. If nobody has a better idea, is the following good for trunk? (I am about to commit it to the hsa branch.) It has passed bootstrap and testing on x86_64-linux. Thanks, Martin 2016-01-06 Martin Jambor * tree-inline.h (copy_body_data): New field decl_creation_prev

Re: [hsa 5/10] OpenMP lowering/expansion changes (gridification)

2015-12-18 Thread Martin Jambor
something for another patch. - "griddim" was changed to "_griddim_" at three places - I fixed formatting in all the suggested ways. Thanks, Martin 2015-12-16 Martin Jambor gcc/ * builtin-types.def: Removed a blank line. * gimple-low.c (lower_stmt)

Re: [PATCH 4/5] Fix intransitive comparison in compare_access_positions

2015-12-17 Thread Martin Jambor
Hi, On Thu, Dec 17, 2015 at 12:02:11PM +0300, Yury Gribov wrote: > Another intransitive comparison in reload_pseudo_compare_func. Buggy > scenario: > 1) A and B are ints of equal presion so we return 0 > 2) C is REAL and thus can compare differently to A and B > > Cc-ing Martin who's the original

[PR 68851] Do not collect thunks in callect_callers

2015-12-14 Thread Martin Jambor
vector in that method (which is only used by IPA-CP at this one spot and IPA-SRA so it should be fine). Bootstrapped and tested on x86_64-linux. OK for trunk? And perhaps for the gcc-5 branch too? Thanks, Martin 2015-12-14 Martin Jambor PR ipa/68851 * cgraph.c

Re: ipa-cp heuristics fixes

2015-12-14 Thread Martin Jambor
Hi, On Fri, Dec 11, 2015 at 10:20:20PM +0100, Jan Hubicka wrote: > Actually I added > if (!ipa_is_param_used (info, i)) > > continue; > > shortcut to gather_context_independent_v

[PR 66616] Check for thunks when adding extra constants to clones

2015-12-11 Thread Martin Jambor
Hi, PR 66616 happens because in find_more_scalar_values_for_callers_subset we do not do the same thunk checks like we do in propagate_constants_accross_call. I am in the process of bootstrapping and testing the following patch to fix it. OK if it passes? Thanks, Martin 2015-12-11 Martin

Re: ipa-cp heuristics fixes

2015-12-11 Thread Martin Jambor
On Thu, Dec 10, 2015 at 05:56:26PM +0100, Jan Hubicka wrote: > > Is this really necessary, is it not enough to remove the assignment to > > ret below? If the parameter is not used, devirtualization time bonus, > > which you then rely on estimate_local_effects, should be zero for it. > > > > It is

[PR 68064] Testcase and an assert for an already fixed bug

2015-12-11 Thread Martin Jambor
kes a big difference for debugging). I have tossed this into a bootstrap and test run on an x86_64-linux and found no issues. I believe the patch is quite obvious and so will go ahead and commit it to trunk. Thanks, Martin Add asssert and testcase for PR 68064 2015-12-09 Martin J

Re: [hsa 2/10] Modifications to libgomp proper

2015-12-10 Thread Martin Jambor
Hi, thanks for the feedback. I have incorporated most of it into the branch (the diff is below) but also have a few questions. On Wed, Dec 09, 2015 at 12:35:36PM +0100, Jakub Jelinek wrote: > On Mon, Dec 07, 2015 at 12:19:57PM +0100, Martin Jambor wrote: > > +/* Flag set when the s

Re: [hsa 0/10] Merge of HSA branch

2015-12-10 Thread Martin Jambor
Hi, On Mon, Dec 07, 2015 at 12:46:45PM +0100, Jakub Jelinek wrote: > On Mon, Dec 07, 2015 at 12:17:58PM +0100, Martin Jambor wrote: > > Because I have not been able to come up with any solution to failing > > libgomp/testsuite/libgomp.c++/target-2.C, I have disabled use of > >

Re: [hsa 1/10] Configury changes and new options

2015-12-10 Thread Martin Jambor
Hi, On Mon, Dec 07, 2015 at 12:19:08PM +0100, Martin Jambor wrote: > Hi, > > this patch contains changes to the configuration mechanism and offload > bits, so that users can build compilers with HSA support. when writing up how to build an HSA-enabled GCC for the wiki page, and

Re: [hsa 1/10] Configury changes and new options

2015-12-10 Thread Martin Jambor
Hi, On Tue, Dec 08, 2015 at 10:43:15PM +, Richard Sandiford wrote: > [Sorry for the low-quality review, was just reading out of interest...] > > Martin Jambor writes: > > +If you configure GCC with HSA offloading but do not have the HSA > > +run-time library installed i

Re: ipa-cp heuristics fixes

2015-12-10 Thread Martin Jambor
Hi, thanks for looking into this, I only have one question: On Thu, Dec 10, 2015 at 08:30:37AM +0100, Jan Hubicka wrote: > Martin, > while looking into the ipa-cp dumps for bzip and Firefox I noticed few issues. > First of all, ipcp_cloning_candidate_p calls > optimize_function_for_speed_p (DECL

[hsa 10/10] HSA register allocator

2015-12-07 Thread Martin Jambor
2015-12-04 Michael Matz Martin Jambor * hsa-regalloc.c: New file. diff --git a/gcc/hsa-regalloc.c b/gcc/hsa-regalloc.c new file mode 100644 index 000..9db4c1d --- /dev/null +++ b/gcc/hsa-regalloc.c @@ -0,0 +1,719 @@ +/* HSAIL IL Register allocation and out-of-SSA

[hsa 8/10] HSAIL BRIG description header file (and a steering committee request)

2015-12-07 Thread Martin Jambor
eering committee for permission to add this file to GCC (and update it as HSA standard evolves). Please let me know if there is something more I need to do in this regard. Thanks, Martin 2015-12-04 Martin Jambor * hsa-brig-format.h: New file. diff --git a/gcc/hsa-brig-format.h b/gcc/h

[hsa 7/10] IPA-HSA pass

2015-12-07 Thread Martin Jambor
gether and remain in the same LTO partition so that they can b registered together to libgomp. Thanks, Martin 2015-12-04 Martin Liska Martin Jambor * ipa-hsa.c: New file. * lto-section-in.c (lto_section_name): Add hsa section name. * lto-streamer.h (lto_se

[hsa 6/10] Pass manager changes

2015-12-07 Thread Martin Jambor
Hi, the pass manager changes required for HSA have already been committed to trunk so all that remains are these additions to the pass pipeline. Thanks, Martin 2015-12-04 Martin Jambor Martin Liska * passes.def: Schedule pass_ipa_hsa and pass_gen_hsail

[hsa 5/10] OpenMP lowering/expansion changes (gridification)

2015-12-07 Thread Martin Jambor
nd yet only re-implement the bare necessary minimum of functionality that is already there. Any feedback is of course still very welcome. Thanks, Martin 2015-12-04 Martin Jambor * builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_P

[hsa 4/10] Merge of HSA branch

2015-12-07 Thread Martin Jambor
Subject: Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses Hi, this is https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00477.html with the early return requested by Jakub. Please refer to that previous email for explanation why it is necessary. Thanks, 2015-12-03 Martin Jambor

[hsa 3/10] HSA libgomp plugin

2015-12-07 Thread Martin Jambor
device-specific parameter and support for asynchronous execution. Any feedback will be greatly appreciated, Martin 2015-12-04 Martin Jambor Martin Liska * plugin/plugin-hsa.c: New file. diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c new file mode

[hsa 2/10] Modifications to libgomp proper

2015-12-07 Thread Martin Jambor
2015-12-04 Martin Jambor Martin Liska include/ * gomp-constants.h (GOMP_DEVICE_HSA): New macro. (GOMP_VERSION_HSA): Likewise. (GOMP_TARGET_ARG_DEVICE_MASK): Likewise. (GOMP_TARGET_ARG_DEVICE_ALL): Likewise. (GOMP_TARGET_ARG_SUBSEQUENT_PARAM

[hsa 1/10] Configury changes and new options

2015-12-07 Thread Martin Jambor
make it a parameter rather than a switch to emphasize the fact it will go away and to possibly allow us select different levels of verbosity of the stores in the future). Any feedback is very appreciated, Martin 2015-12-04 Martin Jambor gcc/ * Makefile.in (OBJS): Add new so

[hsa 0/10] Merge of HSA branch

2015-12-07 Thread Martin Jambor
Hi, I'm sorry it took me more than a month to come up with another round of patches aiming at merging the HSA branch into the trunk. Keeping up-to date with the latest changes in the OpenMP 4.5 area was strenuous and we have discovered and fixed a few bugs as I intensified my testing efforts. Wh

[hsa] Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses

2015-12-03 Thread Martin Jambor
e_seq_copy, walk_gimple_seq and other to be technically incorrect, that is what I have done in the patch below, which fixes my last ICEs and which I have already committed to the branch. Any feedback is of course very much appreciated, Martin 2015-12-03 Martin Jambor * tre

[hsa] Useful checking assert in scan_omp_1_op

2015-12-03 Thread Martin Jambor
Hi, I have found that adding the following checking assert very useful when debugging omp lowering issues, so I have added it to the hsa branch. I hope that nobody will mind, but it of course is not an essential thing to have if someone does. Thanks, Martin 2015-12-03 Martin Jambor

[hsa] Use gimplify_expr in gridification

2015-11-30 Thread Martin Jambor
. Fixed with this patch, where pop_gimplify_context does the right thing like at other places in omp-low.c. Committed to the branch. Thanks, Martin 2015-11-30 Martin Jambor * omp-low.c (attempt_target_gridification): Use gimplify_expr. --- gcc/omp-low.c | 27

[hsa] Use proper accesses to gimple_omp_for

2015-11-30 Thread Martin Jambor
Hi, when looking at the attempt_target_gridification function I realized I forgot to to replace some of the early code with proper gimple statement access function calls. This patch addresses that. Committed to the branch. Thanks, Martin 2015-11-30 Martin Jambor * omp-low.c

[hsa] Describe grid with target clauses

2015-11-30 Thread Martin Jambor
grid size and group size along that dimension (hence the new clause type has two parameters). Committed to the branch, I will be preparing a new diff against the trunk shortly. Thanks, Martin 2015-11-30 Martin Jambor * gimple.c (gimple_omp_target_init_dimensions): Removed

[hsa] Fix static local variable name conflict

2015-11-25 Thread Martin Jambor
Hi, the patch below makes libgomp/testsuite/libgomp.c/target-28.c pass on HSA, where it previously did not like the two static variables with the same name. Committed to the branch. Thanks, Martin 2015-11-25 Martin Jambor * hsa.c (hsa_get_declaration_name): Return ASM name for

[hsa] omp_target_associate_ptr and omp_target_is_present on shared memory

2015-11-25 Thread Martin Jambor
Hi, when looking at why target-12.c and target-24.c in libgomp/testsuite/libgomp.c/, I found two other places in libgomp's target.c where shared-memory devices ought to be treated like the host. Committed to the branch. Thanks, Martin 2015-11-25 Martin Jambor libgomp/ * tar

Re: [hsa] depend nowait support for target

2015-11-25 Thread Martin Jambor
On Mon, Nov 23, 2015 at 03:16:42PM +0100, Jakub Jelinek wrote: > On Mon, Nov 23, 2015 at 03:12:05PM +0100, Martin Jambor wrote: > > +/* Thread routine to run a kernel asynchronously. */ > > + > > +static void * > > +run_kernel_asynchronously (void *thread_arg) > >

[hsa] Perform version checks in HSA plugin

2015-11-23 Thread Martin Jambor
welcome, Martin 2015-11-23 Martin Jambor gcc/ * builtin-types.def (BT_FN_VOID_PTR_INT_PTR): Removed. (BT_FN_VOID_UINT_PTR_INT_PTR): New. * fortran/types.def (BT_FN_VOID_PTR_INT_PTR): Removed. (BT_FN_VOID_UINT_PTR_INT_PTR): New. * hsa-brig.c: Include

[hsa] Use new format of device-specific target arguments

2015-11-23 Thread Martin Jambor
part of this one, then there are 8 bits for an ID of the argument and then up to 16 bits for a value. Thanks, Martin 2015-11-20 Martin Jambor gcc/ * omp-low.c (get_target_argument_identifier_1): New function. (get_target_argument_identifier): Likewise

[hsa] depend nowait support for target

2015-11-23 Thread Martin Jambor
ew places where libgomp has to treat shared memory devices like it treats host, and so I added that to the patch too. The hunk in gomp_create_target_task should have been in the previous merge from trunk but I forgot to add it then. Any feedback welcome, Martin 2015-11-23 Martin Jambor libgom

[hsa] Fix operand and instruction types for bit-ops

2015-11-23 Thread Martin Jambor
Hi, I have applied the following patch tot he HSA branch to fix some rather unexpected type requirements of the HSA finalizer we discovered when running the target-3[34].c libgomp tests. Thanks, Martin 2015-11-23 Martin Jambor * hsa-gen.c (gen_hsa_binary_operation): Make immediate

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Martin Jambor
Hi, On Mon, Nov 23, 2015 at 12:00:25AM +0100, Jan Hubicka wrote: > Hi, > here is updated patch which I finally comitted today. It addresses all the > comments > and also fixes one nasty bug that really cost me a lot of time to understand. > > + /* LTO type merging does not make any diffe

[hsa] Pass kernel launch attributes through a device-specific argument

2015-11-13 Thread Martin Jambor
Hi, this hsa patch is analogous to the for-trunk RFC I have sent a while ago and implements passing HSA-specific grid sizes through a device-specific argument. Committed to the branch. Thanks, Martin 2015-11-13 Martin Jambor include/ * gomp-constants.h

[RFC] Device-specific OpenMP target arguments

2015-11-13 Thread Martin Jambor
ll be an identifier and the second one the value itself. As suggested by Jakub, the first two elements will be common NUM_TEAMS and THREAD_LIMIT from the teams construct, if present. Any comments welcome, Thanks, Martin 2015-11-13 Martin Jambor include/ * gomp-consta

Re: [hsa 5/12] New HSA-related GCC options

2015-11-13 Thread Martin Jambor
On Thu, Nov 12, 2015 at 12:19:50PM +0100, Jakub Jelinek wrote: > On Mon, Nov 09, 2015 at 05:58:56PM +0100, Martin Jambor wrote: > > > But I don't see any way to disable it on the command line? (no switch?) > > > > No, the switch is -foffload, which has missing docume

[hsa] Merged trunk revision 230248 into the hsa branch

2015-11-12 Thread Martin Jambor
Hi I have just Merged trunk revision 230248 into the hsa branch. I will prepare a new submission for inclusion to trunk tomorrow. Thanks, Martin

Re: [hsa 7/12] Disabling the vectorizer for GPU kernels/functions

2015-11-10 Thread Martin Jambor
On Fri, Nov 06, 2015 at 09:38:21AM +0100, Richard Biener wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > Hi, > > > > in the previous email I wrote we need to "change behavior" of a few > > optimization passes. One was the flattening of GPU fu

Re: [hsa 5/12] New HSA-related GCC options

2015-11-09 Thread Martin Jambor
Hi, On Fri, Nov 06, 2015 at 09:42:25AM +0100, Richard Biener wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > Hi, > > > > the following small part of the merge deals with new options. It adds > > four independent things: > > > > 1) flag_dis

Re: [hsa 3/12] HSA libgomp plugin

2015-11-09 Thread Martin Jambor
Hi, On Thu, Nov 05, 2015 at 10:47:44PM +, Joseph Myers wrote: > This new file should have the standard libgomp copyright / license notice. > Oops, thanks for pointing this out. I am about to commit the following remedy to the branch. Thanks, Martin 2015-11-09 Martin

Re: [hsa 1/12] Configuration and offloading-related changes

2015-11-09 Thread Martin Jambor
On Thu, Nov 05, 2015 at 10:47:15PM +, Joseph Myers wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > libgomp plugin to be built. Because the plugin needs to use HSA > > run-time library, I have introduced options --with-hsa-runtime (and > > more precise --wit

Re: [hsa 4/12] OpenMP lowering/expansion changes (gridification)

2015-11-09 Thread Martin Jambor
Hi, On Thu, Nov 05, 2015 at 10:57:33PM +0100, Martin Jambor wrote: > ... > > For convenience of anybody reviewing the code, I'm attaching a very > simple testcase with selection of dumps that illustrate the whole > process. > My apologies, I have forgotten to att

[hsa 12/12] HSA register allocator

2015-11-05 Thread Martin Jambor
2015-11-05 Michael Matz Martin Jambor * hsa-regalloc.c: New file. diff --git a/gcc/hsa-regalloc.c b/gcc/hsa-regalloc.c new file mode 100644 index 000..3919258 --- /dev/null +++ b/gcc/hsa-regalloc.c @@ -0,0 +1,711 @@ +/* HSAIL IL Register allocation and out-of-SSA

[hsa 10/12] HSAIL BRIG description header file (hopefully not a licensing issue)

2015-11-05 Thread Martin Jambor
tandards. I hope that is reasonable. Thanks, Martin 2015-11-05 Martin Jambor * hsa-brig-format.h: New file. diff --git a/gcc/hsa-brig-format.h b/gcc/hsa-brig-format.h new file mode 100644 index 000..f099fc6 --- /dev/null +++ b/gcc/hsa-brig-format.h @@ -0,0 +1,1283 @@ +/* HSAIL an

<    5   6   7   8   9   10   11   12   13   14   >