[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

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 > > > >

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: [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: [hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-03-01 Thread Martin Jambor
Hi, On Fri, Feb 26, 2016 at 05:07:56PM +0100, Jakub Jelinek wrote: > On Fri, Feb 26, 2016 at 04:59:57PM +0100, Martin Jambor wrote: > > just like with the compiler gomp testsuite, we need to add -Wno-hsa to > > options when compiling libgomp testcases in order not to have &qu

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

2016-03-01 Thread Martin Jambor
their own dg-options, which is presumably easier for everyone, provided that hsa will get is own libgomp testsuite directories. OK for trunk? Thanks, Martin 2016-02-29 Martin Jambor * g++.dg/gomp/gomp.exp: Pass -Wno-hsa to all tests. * gcc.dg/gomp/gomp.exp

Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-03-01 Thread Martin Jambor
Hi On Tue, Mar 01, 2016 at 07:47:49PM +0100, Jakub Jelinek wrote: > On Tue, Mar 01, 2016 at 07:39:18PM +0100, Martin Jambor wrote: > > as Jakub requested, this patch deals with HSA "excess errors" in the > > libgomp library testsuite by passing -Wno-hsa to all of them.

Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-03-04 Thread Martin Jambor
Hi, On Tue, Mar 01, 2016 at 11:06:43PM +0100, Jakub Jelinek wrote: > On Tue, Mar 01, 2016 at 10:47:46PM +0100, Martin Jambor wrote: > > well, exactly what I wrote in the original email and what you have > > quoted (and me as well) above. But let me quote the dejagnu source &g

Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-03-04 Thread Martin Jambor
Hi, On Fri, Mar 04, 2016 at 04:31:29PM +0100, Jakub Jelinek wrote: > On Fri, Mar 04, 2016 at 04:27:11PM +0100, Martin Jambor wrote: > > > Ah, ok; what about adding > > > # Disable HSA warnings by default. > > > lappend ALWAYS_CFLAGS "additional_flags=-

Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests

2016-03-04 Thread Martin Jambor
On Fri, Mar 04, 2016 at 05:04:31PM +0100, Jakub Jelinek wrote: > On Fri, Mar 04, 2016 at 05:01:34PM +0100, Martin Jambor wrote: > > Not in the limited runs that I experimented with so far, but I > > certainly kept this possibility in mind too. If so, I would either > > set it

Backport fix of PR 69666 and PR 69920 to gcc-5 branch

2016-03-04 Thread Martin Jambor
(actually, it has passed successfully on x86_64-linux, there is one on i686 that is still running). Thanks, Martin 2016-03-03 Martin Jambor PR tree-optimization/69666 PR middle-end/69920 * tree-sra.c (sra_modify_assign): Do not attempt to create default_def

[hsa] Consodlidate GTY roots for trees used during expansion to HSA

2016-03-07 Thread Martin Jambor
commit it in a few moments. Thanks, Martin 2016-03-02 Martin Jambor * hsa.h (hsa_get_ctor_statements): Declare. (hsa_get_dtor_statements): Likewise. (hsa_get_kernel_dispatch_type): Likewise. * hsa.c (hsa_get_ctor_statements): New function

[hsa testsuite 0/5] Re-post of all pending patches adjusting testsuite for HSA

2016-03-07 Thread Martin Jambor
Hi, in order to consolidate things, I have decided to re-post all "hsa testsuite" patches under this thread. With the patches applied, we do no not get any spurious failures because of hsa warnings or libgomp testcases failing because they are run on the host fallback. Moreover, the first patch a

[hsa testsuite 3/5] Suppress hsa warnings in libgomp tests

2016-03-07 Thread Martin Jambor
ism way of executing stuff. The patch below adds the option to all libgomp testsuite compilations, so that people who are not interested in HSA do not need to care. The patch has been tested both with and without HSA enabled. OK for trunk? Thanks, Martin 2016-03-04 Martin Jambor * tes

[hsa testsuite 1/5] Gridification tests

2016-03-07 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 testsuite 5/5] New directory for HSA-specific C testcases

2016-03-07 Thread Martin Jambor
hanks, Martin 2016-03-03 Martin Jambor * testsuite/lib/libgomp.exp (check_effective_target_hsa_offloading_selected_nocache): New. (check_effective_target_hsa_offloading_selected): Likewise. * testsuite/libgomp.hsa.c/c.exp: Likewise. * testsuite/libgomp.

[hsa testsuite 4/5] Adjust libgomp tests that do not work on host fallback

2016-03-07 Thread Martin Jambor
ons are welcome. Tested both with and without HSA (enabled or present). OK for trunk? Thanks, Martin 2016-02-12 Martin Jambor libgomp/ * testsuite/libgomp.c/examples-4/async_target-2.c: Only run on non-shared memory accelerators. * testsuite/libgomp.c/exampl

[hsa testsuite 2/5] Suppress hsa warnings in compiler gomp tests

2016-03-07 Thread Martin Jambor
he rest is handled by turning dg-options into dg-additional-options. OK for trunk? Thanks, Martin [1] https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00381.html 2016-03-04 Martin Jambor * c-c++-common/gomp/clauses-1.c: Remove dg-options. * c-c++-common/gomp/if-1.c

Re: [RFC][PR69708] IPA inline not working for function reference in static const struc

2016-03-10 Thread Martin Jambor
for non-scalar types, if they are exact copies of a read-only aggregate) and change the consumers so that they use the static initializers to look up the value. This would also have the added advantage that parameter PARAM_IPA_MAX_AGG_ITEMS would not be an issue. So he cu

[omp] Create openmp -fopt-info optimization group

2016-03-19 Thread Martin Jambor
examining the generated info files. Since it is only a dumping change, I'd like to propose it for trunk even at this late stage. If release managers however do not think it is desirable, I'll commit it to the hsa branch and propose to trunk again once stage1 opens. Thanks, Martin 2016-03-

[hsa branch] Use an obstack instead of multiple alloc pools

2016-03-19 Thread Martin Jambor
wrote the following patch which changes allocations from the various hsa alloc pools to allocations from one obstack. I have just committed the patch to the hsa branch after testing it. Thanks, Martin 2016-03-17 Martin Liska Martin Jambor * hsa-gen.c

Re: [PATCH] Retry to emit global variables in HSA (PR hsa/70234)

2016-03-19 Thread Martin Jambor
Hi, On Tue, Mar 15, 2016 at 12:59:03PM +0100, Martin Liska wrote: > Hi. > > As emission of a HSAIL function can fail for various reason (-Whsa), > we must guarantee that a global variable is declared and at maximum once. > > Following patch does that, patch can survive make check-target-libgomp

Re: [HSA, PATCH] Enhance dump output

2016-03-21 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 12:14:19PM +0100, Martin Liska wrote: > Hello. > > Following patch enhances dump output for SBR instructions and > provides a BRIG offset of HSA symbols. The change does not touch any > code generation snippet and I hope it can be installed during the stage4? yes, but

Re: [HSA, PATCH] Allocate memory for shadow arg (PR hsa/70337)

2016-03-21 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 01:49:25PM +0100, Martin Liska wrote: > Hello. > > Following patch fixes an invalid write in HSA plug-in. > I've been running bootstrap and regression tests on x86-linux-gnu. > > Ready after it finishes? > Thanks, > Martin > From 2674ceb5fddeaeb26ff87d26a43bddaf40060

Re: [HSA, PATCH] Allocate memory for shadow arg (PR hsa/70337)

2016-03-22 Thread Martin Jambor
On Mon, Mar 21, 2016 at 09:51:27PM +0100, Martin Liska wrote: > On 03/21/2016 07:23 PM, Martin Jambor wrote: > >This is strange. The pointer to the shadow data structure is, from > >the HSA perspective, a normal kernel argument and therefore should > >already be i

Re: [PATCH] Properly assign to packet header (PR hsa/70394)

2016-03-24 Thread Martin Jambor
Hi, On Thu, Mar 24, 2016 at 12:48:34PM +0100, Martin Liska wrote: > Hello. > > Following patch initializes whole packet->header field, which is eventually > stored > to a packet in atomic manner. The function mechanism was adopted from the HSA > runtime > manual. > > I've been running bootstra

Re: [PATCH 1/4, libgomp] Resolve deadlock on plugin exit

2016-03-24 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 06:21:02PM +0800, Chung-Lin Tang wrote: > Hi, this is the set of patches from > https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01411.html > revised again, this time also with audits for the HSA plugin. > > The changes are pretty minor, mainly that the unload_image hook

Re: [PATCH 3/4, libgomp] Resolve deadlock on plugin exit, HSA plugin parts

2016-03-24 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 06:22:17PM +0800, Chung-Lin Tang wrote: > Hi Martin, I think you're the one to CC for this, > as I mentioned in the first email, this has been build tested, however I did > not know if I could test this without a Radeon card. If convenient, > could you or anyone famili

Re: [PATCH 3/4, libgomp] Resolve deadlock on plugin exit, HSA plugin parts

2016-03-29 Thread Martin Jambor
Hi, On Sun, Mar 27, 2016 at 06:26:29PM +0800, Chung-Lin Tang wrote: > On 2016/3/25 上午 02:40, Martin Jambor wrote: > > On the whole, I am fine with the patch but there are two issues: > > > > First, and generally, when you change the return type of a function, > > yo

Re: [PATCH 1/2] HSA: support alignment for hsa_symbols (PR hsa/70391)

2016-03-31 Thread Martin Jambor
Hi, this is OK with one small adjustments in a comment: On Tue, Mar 22, 2016 at 03:51:53PM +0100, Martin Liska wrote: > gcc/ChangeLog: > > 2016-03-23 Martin Liska > > PR hsa/70391 > * hsa-brig.c (emit_directive_variable): Emit alignment > according to hsa_symbol::m_align. >

Re: [PATCH 2/2] HSA: handle alignment of string builtins (PR hsa/70391)

2016-03-31 Thread Martin Jambor
Hi, On Wed, Mar 23, 2016 at 02:43:17PM +0100, Martin Liska wrote: > gcc/ChangeLog: > > 2016-03-23 Martin Liska > > PR hsa/70391 > * hsa-gen.c (hsa_function_representation::update_cfg): New > function. > (convert_addr_to_flat_segment): Likewise. > (gen_hsa_memory_

Re: [PATCH 2/2] Fix PR hsa/70402

2016-04-01 Thread Martin Jambor
Hi, On Thu, Mar 31, 2016 at 12:50:54PM +0200, Martin Liska wrote: > On 03/29/2016 01:44 PM, Martin Liška wrote: > > Second part of the patch set which omits one split_block (compared to the > > original patch). > > Acceptable just in case the first part will be accepted. > > > > Thanks > > Marti

Re: Splitting up gcc/omp-low.c?

2016-04-08 Thread Martin Jambor
Hi, On Fri, Apr 08, 2016 at 11:36:03AM +0200, Thomas Schwinge wrote: > Hi! > > On Thu, 10 Dec 2015 09:08:35 +0100, Jakub Jelinek wrote: > > On Wed, Dec 09, 2015 at 06:23:22PM +0100, Bernd Schmidt wrote: > > > On 12/09/2015 05:24 PM, Thomas Schwinge wrote: > > > > > > > >In addition to that, how

[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

[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

[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

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

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: [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: [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

[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

[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 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 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 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 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 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 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 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

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.

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 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 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 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 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 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 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-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-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 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

[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: [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

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: 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

[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: [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 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: [RFC] Extend ipa-bitwise-cp with pointer alignment propagation

2016-10-05 Thread Martin Jambor
Hi, sorry, my main desktop disk has died (a slow but certain) death so I am not particularly responsive either. On Tue, Oct 04, 2016 at 12:37:38AM +0530, Prathamesh Kulkarni wrote: > On 22 September 2016 at 17:26, Jan Hubicka wrote: > > Yes, can you please verify that alignments it computes are

[hsa-branch 4/9] Add expansion of reciprocal of square root

2016-10-10 Thread Martin Jambor
Hi, this patch is a simple addition of reciprocal of square root gimple function into its HSAIL equivalent. Committed to the branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Jambor * hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Also handle IFN_RSQRT

[hsa-branch 2/9] Lastprivate lowering for gridified kernels

2016-10-10 Thread Martin Jambor
rking with the value. Committed to the branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Jambor * gimple.h (GF_OMP_FOR_GRID_PHONY): Added comment. (GF_OMP_FOR_GRID_INTRA_GROUP): New. (gimple_omp_for_grid_phony): A

[hsa-branch 3/9] Handle simds within gridified loops gracefully

2016-10-10 Thread Martin Jambor
branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Jambor * omp-low.c (grid_find_ungridifiable_statement): Do not bail out for simd loops. (grid_inner_loop_gridifiable_p): Likewise. (grid_process_grid_body): New function

[hsa-branch 6/9] Expand FMA_EXPR to HSAIL

2016-10-10 Thread Martin Jambor
, Martin 2016-10-03 Martin Jambor * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Handle FMA_EXPR and ternary operators in general. Remove obsolete fallthrough comments. --- gcc/hsa-gen.c | 27 --- 1 file changed, 24 insertions(+), 3

[hsa-branch 1/9] Builtins for gridsize and currentworkgroupsize

2016-10-10 Thread Martin Jambor
, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Jambor * hsa-builtins.def (BUILT_IN_HSA_GRIDSIZE): New. (BUILT_IN_HSA_CURRENTWORKGROUPSIZE): Likewise. * hsa-gen.c (gen_hsa_insns_for_call): Handle BUILT_IN_HSA_GRIDSIZE. --- gcc/hsa-builtins.def | 4

[hsa-branch 5/9] Properly detect variadic arguments

2016-10-10 Thread Martin Jambor
Hi, this patch from Martin properly detects some variadic calls which we have failed to detect before during expansion to HSAIL. Committed to the branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Liska Martin Jambor * hsa-gen.c

[hsa-branch 7/9] Ignore prefetch builtin

2016-10-10 Thread Martin Jambor
, Martin 2016-10-03 Martin Jambor * hsa-gen.c (gen_hsa_insns_for_call): Ignore prefetch builtin. --- gcc/hsa-gen.c | 8 1 file changed, 8 insertions(+) diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index ad40087..8893a28 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -5530,6

[hsa-branch 8/9] Fail instead of calling an unknown GOMP builtin

2016-10-10 Thread Martin Jambor
. Committed to the branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin Jambor * hsa-gen.c (gen_hsa_insns_for_call): Fail when encountering a GOMP builtin that we cannot process ourselves. --- gcc/hsa-gen.c | 10 +- 1 file changed, 9 insertions(+), 1

[hsa-branch 9/9] Fix another finalizer type complaint

2016-10-10 Thread Martin Jambor
Hi, the subsequent patch deals with a finalizer error issued when we ave a register-register move of an HSAIL vector type. Apparently, such a move must obey the same rules as vector loads and stores. Committed to the branch, queued for merge to trunk soon. Thanks, Martin 2016-10-03 Martin

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] 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

[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] 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] 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] 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] 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] 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 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 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 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 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 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 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 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 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 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 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

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

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: [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 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

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