public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] BRIG frontend: request for a global review
@ 2016-12-14 17:24 Pekka Jääskeläinen
  2017-01-12 14:55 ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2016-12-14 17:24 UTC (permalink / raw)
  To: gcc-patches, Martin Jambor

[-- Attachment #1: Type: text/plain, Size: 7433 bytes --]

Hi,

I'm calling for a global review for the BRIG frontend for inclusion in upstream.
The copyright transfer has been taken care of.

The patch set has been approved by Martin Jambor, the upcoming co-maintainer of
the BRIG frontend, who asked me to send an updated patch set for a
global reviewer
to look at.

Please find the patches attached to this email. An introduction and
a diffstat is below.

Best regards,
Pekka


--------

This patch set adds a BRIG (HSAIL) frontend. It can be used as a core
for an HSAIL finalizer implementation for processors with gcc backends.

It is a bit unusual frontend as the consumed format is a binary
representation.  The textual HSAIL can be compiled to it with a separate
assembler tool.

The frontend has been mostly tested with the HSA 1.0 PRM conformance suite
which it now passes. The accompanied GENERIC-scanning test suite is supposed
to be only a smoke test.

libhsail-rt implements HSAIL specific builtins and includes a simple runtime
that implements SPMD execution via setcontext()/getcontext() or loops to
execute multiple work-item work groups without SPMD/SIMD-default hardware.

We've split it to 4 patches:

001 - the configuration file changes and misc.
002 - the frontend itself
003 - libhsail-rt
004 - the smoke test suite

The diffstat is as follows:

 .gitignore                                        |     2 +-
 Makefile.def                                      |     3 +
 Makefile.in                                       |   489 +
 configure                                         |     1 +
 configure.ac                                      |     1 +
 gcc/brig-builtins.def                             |   659 +
 gcc/brig/Make-lang.in                             |   247 +
 gcc/brig/brig-builtins.h                          |    99 +
 gcc/brig/brig-c.h                                 |    66 +
 gcc/brig/brig-lang.c                              |   770 +
 gcc/brig/brigfrontend/brig-arg-block-handler.cc   |    66 +
 gcc/brig/brigfrontend/brig-atomic-inst-handler.cc |   265 +
 gcc/brig/brigfrontend/brig-basic-inst-handler.cc  |   865 +
 gcc/brig/brigfrontend/brig-branch-inst-handler.cc |   221 +
 gcc/brig/brigfrontend/brig-cmp-inst-handler.cc    |   198 +
 gcc/brig/brigfrontend/brig-code-entry-handler.cc  |  1719 ++
 gcc/brig/brigfrontend/brig-code-entry-handler.h   |   425 +
 gcc/brig/brigfrontend/brig-comment-handler.cc     |    39 +
 gcc/brig/brigfrontend/brig-control-handler.cc     |   108 +
 .../brigfrontend/brig-copy-move-inst-handler.cc   |    73 +
 gcc/brig/brigfrontend/brig-cvt-inst-handler.cc    |   260 +
 gcc/brig/brigfrontend/brig-fbarrier-handler.cc    |    44 +
 gcc/brig/brigfrontend/brig-function-handler.cc    |   373 +
 gcc/brig/brigfrontend/brig-function.cc            |   723 +
 gcc/brig/brigfrontend/brig-function.h             |   213 +
 gcc/brig/brigfrontend/brig-inst-mod-handler.cc    |    58 +
 gcc/brig/brigfrontend/brig-label-handler.cc       |    37 +
 gcc/brig/brigfrontend/brig-lane-inst-handler.cc   |    84 +
 gcc/brig/brigfrontend/brig-machine.c              |    44 +
 gcc/brig/brigfrontend/brig-machine.h              |    33 +
 gcc/brig/brigfrontend/brig-mem-inst-handler.cc    |   180 +
 gcc/brig/brigfrontend/brig-module-handler.cc      |    41 +
 gcc/brig/brigfrontend/brig-queue-inst-handler.cc  |    93 +
 gcc/brig/brigfrontend/brig-seg-inst-handler.cc    |   146 +
 gcc/brig/brigfrontend/brig-signal-inst-handler.cc |    42 +
 gcc/brig/brigfrontend/brig-to-generic.cc          |   811 +
 gcc/brig/brigfrontend/brig-to-generic.h           |   226 +
 gcc/brig/brigfrontend/brig-util.cc                |   447 +
 gcc/brig/brigfrontend/brig-util.h                 |    53 +
 gcc/brig/brigfrontend/brig-variable-handler.cc    |   264 +
 gcc/brig/brigfrontend/phsa.h                      |    69 +
 gcc/brig/brigspec.c                               |   135 +
 gcc/brig/config-lang.in                           |    41 +
 gcc/brig/lang-specs.h                             |    28 +
 gcc/brig/lang.opt                                 |    41 +
 gcc/builtin-types.def                             |    80 +-
 gcc/builtins.def                                  |    41 +
 gcc/config.in                                     |     6 +
 gcc/configure                                     |     6 +
 gcc/configure.ac                                  |     5 +
 gcc/doc/frontends.texi                            |     2 +-
 gcc/doc/invoke.texi                               |     8 +
 gcc/doc/standards.texi                            |     8 +
 gcc/testsuite/brig.dg/README                      |    10 +
 gcc/testsuite/brig.dg/dg.exp                      |    27 +
 gcc/testsuite/brig.dg/test/gimple/alloca.hsail    |    37 +
 gcc/testsuite/brig.dg/test/gimple/atomics.hsail   |    33 +
 gcc/testsuite/brig.dg/test/gimple/branches.hsail  |    58 +
 gcc/testsuite/brig.dg/test/gimple/fbarrier.hsail  |    74 +
 .../brig.dg/test/gimple/function_calls.hsail      |    59 +
 gcc/testsuite/brig.dg/test/gimple/kernarg.hsail   |    25 +
 gcc/testsuite/brig.dg/test/gimple/mem.hsail       |    39 +
 gcc/testsuite/brig.dg/test/gimple/mulhi.hsail     |    33 +
 gcc/testsuite/brig.dg/test/gimple/packed.hsail    |    78 +
 .../brig.dg/test/gimple/smoke_test.hsail          |    91 +
 gcc/testsuite/brig.dg/test/gimple/variables.hsail |   124 +
 gcc/testsuite/brig.dg/test/gimple/vector.hsail    |    57 +
 gcc/testsuite/lib/brig-dg.exp                     |    29 +
 gcc/testsuite/lib/brig.exp                        |    40 +
 include/hsa-interface.h                           |   630 +
 libhsail-rt/Makefile.am                           |   124 +
 libhsail-rt/Makefile.in                           |   740 +
 libhsail-rt/README                                |     4 +
 libhsail-rt/aclocal.m4                            |   978 +
 libhsail-rt/config.h.in                           |   217 +
 libhsail-rt/configure                             | 17016 ++++++++++++++++++
 libhsail-rt/configure.ac                          |   151 +
 libhsail-rt/include/internal/fibers.h             |    95 +
 .../include/internal/phsa-queue-interface.h       |    60 +
 libhsail-rt/include/internal/phsa-rt.h            |    94 +
 libhsail-rt/include/internal/workitems.h          |   107 +
 libhsail-rt/m4/libtool.m4                         |  7997 ++++++++
 libhsail-rt/m4/ltoptions.m4                       |   384 +
 libhsail-rt/m4/ltsugar.m4                         |   123 +
 libhsail-rt/m4/ltversion.m4                       |    23 +
 libhsail-rt/m4/lt~obsolete.m4                     |    98 +
 libhsail-rt/rt/arithmetic.c                       |   475 +
 libhsail-rt/rt/atomics.c                          |   115 +
 libhsail-rt/rt/bitstring.c                        |   190 +
 libhsail-rt/rt/fbarrier.c                         |    87 +
 libhsail-rt/rt/fibers.c                           |   212 +
 libhsail-rt/rt/fp16.c                             |   135 +
 libhsail-rt/rt/misc.c                             |    89 +
 libhsail-rt/rt/multimedia.c                       |   135 +
 libhsail-rt/rt/queue.c                            |    71 +
 libhsail-rt/rt/sat_arithmetic.c                   |   299 +
 libhsail-rt/rt/segment.c                          |    57 +
 libhsail-rt/rt/workitems.c                        |   952 +
 libhsail-rt/target-config.h.in                    |    68 +
 99 files changed, 43495 insertions(+), 3 deletions(-)

[-- Attachment #2: 001-brig-fe-config-etc.patch.gz --]
[-- Type: application/x-gzip, Size: 144379 bytes --]

[-- Attachment #3: 002-brig-fe-gcc.patch.gz --]
[-- Type: application/x-gzip, Size: 72810 bytes --]

[-- Attachment #4: 003-brig-fe-libhsail-rt.patch.gz --]
[-- Type: application/x-gzip, Size: 17369 bytes --]

[-- Attachment #5: 004-brig-fe-testsuite.patch.gz --]
[-- Type: application/x-gzip, Size: 7157 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2016-12-14 17:24 [PATCH] BRIG frontend: request for a global review Pekka Jääskeläinen
@ 2017-01-12 14:55 ` Pekka Jääskeläinen
       [not found]   ` <CAFiYyc1z7aOxvjBG_b-Z7SQ5-XgM7dLh51M9AeARBFM7CeCd=w@mail.gmail.com>
                     ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-12 14:55 UTC (permalink / raw)
  To: gcc-patches, Martin Jambor

Hi,

A gentle ping...

On Wed, Dec 14, 2016 at 7:15 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> Hi,
>
> I'm calling for a global review for the BRIG frontend for inclusion in upstream.
> The copyright transfer has been taken care of.
>
> The patch set has been approved by Martin Jambor, the upcoming co-maintainer of
> the BRIG frontend, who asked me to send an updated patch set for a
> global reviewer
> to look at.
>
> Please find the patches attached to this email. An introduction and
> a diffstat is below.
>
> Best regards,
> Pekka
>
>
> --------
>
> This patch set adds a BRIG (HSAIL) frontend. It can be used as a core
> for an HSAIL finalizer implementation for processors with gcc backends.
>
> It is a bit unusual frontend as the consumed format is a binary
> representation.  The textual HSAIL can be compiled to it with a separate
> assembler tool.
>
> The frontend has been mostly tested with the HSA 1.0 PRM conformance suite
> which it now passes. The accompanied GENERIC-scanning test suite is supposed
> to be only a smoke test.
>
> libhsail-rt implements HSAIL specific builtins and includes a simple runtime
> that implements SPMD execution via setcontext()/getcontext() or loops to
> execute multiple work-item work groups without SPMD/SIMD-default hardware.
>
> We've split it to 4 patches:
>
> 001 - the configuration file changes and misc.
> 002 - the frontend itself
> 003 - libhsail-rt
> 004 - the smoke test suite
>
> The diffstat is as follows:
>
>  .gitignore                                        |     2 +-
>  Makefile.def                                      |     3 +
>  Makefile.in                                       |   489 +
>  configure                                         |     1 +
>  configure.ac                                      |     1 +
>  gcc/brig-builtins.def                             |   659 +
>  gcc/brig/Make-lang.in                             |   247 +
>  gcc/brig/brig-builtins.h                          |    99 +
>  gcc/brig/brig-c.h                                 |    66 +
>  gcc/brig/brig-lang.c                              |   770 +
>  gcc/brig/brigfrontend/brig-arg-block-handler.cc   |    66 +
>  gcc/brig/brigfrontend/brig-atomic-inst-handler.cc |   265 +
>  gcc/brig/brigfrontend/brig-basic-inst-handler.cc  |   865 +
>  gcc/brig/brigfrontend/brig-branch-inst-handler.cc |   221 +
>  gcc/brig/brigfrontend/brig-cmp-inst-handler.cc    |   198 +
>  gcc/brig/brigfrontend/brig-code-entry-handler.cc  |  1719 ++
>  gcc/brig/brigfrontend/brig-code-entry-handler.h   |   425 +
>  gcc/brig/brigfrontend/brig-comment-handler.cc     |    39 +
>  gcc/brig/brigfrontend/brig-control-handler.cc     |   108 +
>  .../brigfrontend/brig-copy-move-inst-handler.cc   |    73 +
>  gcc/brig/brigfrontend/brig-cvt-inst-handler.cc    |   260 +
>  gcc/brig/brigfrontend/brig-fbarrier-handler.cc    |    44 +
>  gcc/brig/brigfrontend/brig-function-handler.cc    |   373 +
>  gcc/brig/brigfrontend/brig-function.cc            |   723 +
>  gcc/brig/brigfrontend/brig-function.h             |   213 +
>  gcc/brig/brigfrontend/brig-inst-mod-handler.cc    |    58 +
>  gcc/brig/brigfrontend/brig-label-handler.cc       |    37 +
>  gcc/brig/brigfrontend/brig-lane-inst-handler.cc   |    84 +
>  gcc/brig/brigfrontend/brig-machine.c              |    44 +
>  gcc/brig/brigfrontend/brig-machine.h              |    33 +
>  gcc/brig/brigfrontend/brig-mem-inst-handler.cc    |   180 +
>  gcc/brig/brigfrontend/brig-module-handler.cc      |    41 +
>  gcc/brig/brigfrontend/brig-queue-inst-handler.cc  |    93 +
>  gcc/brig/brigfrontend/brig-seg-inst-handler.cc    |   146 +
>  gcc/brig/brigfrontend/brig-signal-inst-handler.cc |    42 +
>  gcc/brig/brigfrontend/brig-to-generic.cc          |   811 +
>  gcc/brig/brigfrontend/brig-to-generic.h           |   226 +
>  gcc/brig/brigfrontend/brig-util.cc                |   447 +
>  gcc/brig/brigfrontend/brig-util.h                 |    53 +
>  gcc/brig/brigfrontend/brig-variable-handler.cc    |   264 +
>  gcc/brig/brigfrontend/phsa.h                      |    69 +
>  gcc/brig/brigspec.c                               |   135 +
>  gcc/brig/config-lang.in                           |    41 +
>  gcc/brig/lang-specs.h                             |    28 +
>  gcc/brig/lang.opt                                 |    41 +
>  gcc/builtin-types.def                             |    80 +-
>  gcc/builtins.def                                  |    41 +
>  gcc/config.in                                     |     6 +
>  gcc/configure                                     |     6 +
>  gcc/configure.ac                                  |     5 +
>  gcc/doc/frontends.texi                            |     2 +-
>  gcc/doc/invoke.texi                               |     8 +
>  gcc/doc/standards.texi                            |     8 +
>  gcc/testsuite/brig.dg/README                      |    10 +
>  gcc/testsuite/brig.dg/dg.exp                      |    27 +
>  gcc/testsuite/brig.dg/test/gimple/alloca.hsail    |    37 +
>  gcc/testsuite/brig.dg/test/gimple/atomics.hsail   |    33 +
>  gcc/testsuite/brig.dg/test/gimple/branches.hsail  |    58 +
>  gcc/testsuite/brig.dg/test/gimple/fbarrier.hsail  |    74 +
>  .../brig.dg/test/gimple/function_calls.hsail      |    59 +
>  gcc/testsuite/brig.dg/test/gimple/kernarg.hsail   |    25 +
>  gcc/testsuite/brig.dg/test/gimple/mem.hsail       |    39 +
>  gcc/testsuite/brig.dg/test/gimple/mulhi.hsail     |    33 +
>  gcc/testsuite/brig.dg/test/gimple/packed.hsail    |    78 +
>  .../brig.dg/test/gimple/smoke_test.hsail          |    91 +
>  gcc/testsuite/brig.dg/test/gimple/variables.hsail |   124 +
>  gcc/testsuite/brig.dg/test/gimple/vector.hsail    |    57 +
>  gcc/testsuite/lib/brig-dg.exp                     |    29 +
>  gcc/testsuite/lib/brig.exp                        |    40 +
>  include/hsa-interface.h                           |   630 +
>  libhsail-rt/Makefile.am                           |   124 +
>  libhsail-rt/Makefile.in                           |   740 +
>  libhsail-rt/README                                |     4 +
>  libhsail-rt/aclocal.m4                            |   978 +
>  libhsail-rt/config.h.in                           |   217 +
>  libhsail-rt/configure                             | 17016 ++++++++++++++++++
>  libhsail-rt/configure.ac                          |   151 +
>  libhsail-rt/include/internal/fibers.h             |    95 +
>  .../include/internal/phsa-queue-interface.h       |    60 +
>  libhsail-rt/include/internal/phsa-rt.h            |    94 +
>  libhsail-rt/include/internal/workitems.h          |   107 +
>  libhsail-rt/m4/libtool.m4                         |  7997 ++++++++
>  libhsail-rt/m4/ltoptions.m4                       |   384 +
>  libhsail-rt/m4/ltsugar.m4                         |   123 +
>  libhsail-rt/m4/ltversion.m4                       |    23 +
>  libhsail-rt/m4/lt~obsolete.m4                     |    98 +
>  libhsail-rt/rt/arithmetic.c                       |   475 +
>  libhsail-rt/rt/atomics.c                          |   115 +
>  libhsail-rt/rt/bitstring.c                        |   190 +
>  libhsail-rt/rt/fbarrier.c                         |    87 +
>  libhsail-rt/rt/fibers.c                           |   212 +
>  libhsail-rt/rt/fp16.c                             |   135 +
>  libhsail-rt/rt/misc.c                             |    89 +
>  libhsail-rt/rt/multimedia.c                       |   135 +
>  libhsail-rt/rt/queue.c                            |    71 +
>  libhsail-rt/rt/sat_arithmetic.c                   |   299 +
>  libhsail-rt/rt/segment.c                          |    57 +
>  libhsail-rt/rt/workitems.c                        |   952 +
>  libhsail-rt/target-config.h.in                    |    68 +
>  99 files changed, 43495 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
       [not found]   ` <CAFiYyc1z7aOxvjBG_b-Z7SQ5-XgM7dLh51M9AeARBFM7CeCd=w@mail.gmail.com>
@ 2017-01-13 15:44     ` Pekka Jääskeläinen
  2017-01-13 21:38       ` Richard Biener
  2017-01-14 13:21       ` Pekka Jääskeläinen
  0 siblings, 2 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-13 15:44 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, Martin Jambor

Hi Richard,

Thanks for the review! Replies/questions inline.

On Fri, Jan 13, 2017 at 2:28 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
>> Hi,
>>
>> A gentle ping...
>
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 140b9f9..06941c5 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -996,6 +996,11 @@ if test x"$enable_hsa" = x1 ; then
>      [Define this to enable support for generating HSAIL.])
>  fi
>
> +if echo "$enable_languages" | grep "brig" > /dev/null; then
> +  AC_DEFINE(ENABLE_BRIG_FE, 1,
> +    [Define this to enable the BRIG (HSAIL) frontend.])
> +fi
> +
>
> this looks odd and I'd have expected this to be solely controlled via
> --enable-languages at configure time?

Yes, it is. This AC_DEFINE just adds an autoconf variable ENABLE_BRIG_FE
using which I guard unnecessary inclusion of the brig-builtins.def in
builtins.def in
case BRIG FE is disabled.

> @@ -1366,6 +1369,11 @@ assembler  assembler-with-cpp
>  ada
>  f77  f77-cpp-input f95  f95-cpp-input
>  go
> +<<<<<<< HEAD
> +java
> +brig
> +=======
> +>>>>>>> gcc-master
>  @end smallexample
>
>  @item -x none
>
> unmerged hunk (java is gone).

Cleaned.

> diff --git a/include/hsa-interface.h b/include/hsa-interface.h
> new file mode 100644
> index 0000000..6765751
> --- /dev/null
> +++ b/include/hsa-interface.h
> @@ -0,0 +1,630 @@
> +/* HSA runtime API 1.0.1 representation description.
> +   Copyright (C) 2016 Free Software Foundation, Inc.
> +
> ...
>
> this looks like a sub/superset of libgomp/plugin/hsa.h, please work on
> retaining only one version.

Merged.

> Did you check whether libhsail-rt builds for all GCC targets?  If not
> you probably want to add
> a list where to disable the frontend and its runtime (see go / libgo
> for an example in the
> toplevel configure.ac).

I have tested only x86 of the GCC upstream targets so far.

Libgo seems to black list known broken ones with a separate --enable-libgo
switch to force enable.  However, BRIG FE and libhsail-rt are disabled
by default.
Should I still add a separate switch to force enable BRIG and enable
it by default for x86?

Or should I force disable it even when enabled with --enable-languages when
building for an untested target?


Thanks,
Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
       [not found]   ` <CAFiYyc10E20yQiTORts82HdbB1FyuwKbLvqwnKnSZuTOXe8r1Q@mail.gmail.com>
@ 2017-01-13 15:54     ` Pekka Jääskeläinen
  2017-01-16  8:46       ` Richard Biener
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-13 15:54 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, Martin Jambor

On Fri, Jan 13, 2017 at 2:34 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
>> Hi,
>>
>> A gentle ping...
>
> Looking at 002/
>
> What's the reason of having brig-builtins.def?  I do not see any
> middle-end stuff using them
> and if you just emit calls to the runtime then you do not need
> "builtins" for this -- just build
> the function decls in the frontend.  The Fortran frontend has examples
> for how to do that
> for almost all entries to the libgfortran runtime.
>
> So all changes besides in brig/ look unnecessary to me.

Most of the HSAIL instructions represented as builtins here are fine
grained enough for
them to be candidates for expanding as sensible target instruction
sequences instead of runtime
function calls.

I understand that there is no code in any of the targets to do so yet.
But still I wonder is it
meaningful to convert them to direct runtime function calls -- if/when
a target wants
to optimize their HSAIL codegen they have to be moved back. Especially given
the BRIG FE is not enabled by default and the inclusion of the BRIG
builtins is done
only if enabled, does it cause harm?

BR,
--Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-13 15:44     ` Pekka Jääskeläinen
@ 2017-01-13 21:38       ` Richard Biener
  2017-01-14 13:21       ` Pekka Jääskeläinen
  1 sibling, 0 replies; 31+ messages in thread
From: Richard Biener @ 2017-01-13 21:38 UTC (permalink / raw)
  To: Pekka Jääskeläinen; +Cc: GCC Patches, Martin Jambor

On January 13, 2017 4:43:30 PM GMT+01:00, "Pekka Jääskeläinen" <pekka@parmance.com> wrote:
>Hi Richard,
>
>Thanks for the review! Replies/questions inline.
>
>On Fri, Jan 13, 2017 at 2:28 PM, Richard Biener
><richard.guenther@gmail.com> wrote:
>> On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen
><pekka@parmance.com> wrote:
>>> Hi,
>>>
>>> A gentle ping...
>>
>> diff --git a/gcc/configure.ac b/gcc/configure.ac
>> index 140b9f9..06941c5 100644
>> --- a/gcc/configure.ac
>> +++ b/gcc/configure.ac
>> @@ -996,6 +996,11 @@ if test x"$enable_hsa" = x1 ; then
>>      [Define this to enable support for generating HSAIL.])
>>  fi
>>
>> +if echo "$enable_languages" | grep "brig" > /dev/null; then
>> +  AC_DEFINE(ENABLE_BRIG_FE, 1,
>> +    [Define this to enable the BRIG (HSAIL) frontend.])
>> +fi
>> +
>>
>> this looks odd and I'd have expected this to be solely controlled via
>> --enable-languages at configure time?
>
>Yes, it is. This AC_DEFINE just adds an autoconf variable
>ENABLE_BRIG_FE
>using which I guard unnecessary inclusion of the brig-builtins.def in
>builtins.def in
>case BRIG FE is disabled.
>
>> @@ -1366,6 +1369,11 @@ assembler  assembler-with-cpp
>>  ada
>>  f77  f77-cpp-input f95  f95-cpp-input
>>  go
>> +<<<<<<< HEAD
>> +java
>> +brig
>> +=======
>> +>>>>>>> gcc-master
>>  @end smallexample
>>
>>  @item -x none
>>
>> unmerged hunk (java is gone).
>
>Cleaned.
>
>> diff --git a/include/hsa-interface.h b/include/hsa-interface.h
>> new file mode 100644
>> index 0000000..6765751
>> --- /dev/null
>> +++ b/include/hsa-interface.h
>> @@ -0,0 +1,630 @@
>> +/* HSA runtime API 1.0.1 representation description.
>> +   Copyright (C) 2016 Free Software Foundation, Inc.
>> +
>> ...
>>
>> this looks like a sub/superset of libgomp/plugin/hsa.h, please work
>on
>> retaining only one version.
>
>Merged.
>
>> Did you check whether libhsail-rt builds for all GCC targets?  If not
>> you probably want to add
>> a list where to disable the frontend and its runtime (see go / libgo
>> for an example in the
>> toplevel configure.ac).
>
>I have tested only x86 of the GCC upstream targets so far.
>
>Libgo seems to black list known broken ones with a separate
>--enable-libgo
>switch to force enable.  However, BRIG FE and libhsail-rt are disabled
>by default.
>Should I still add a separate switch to force enable BRIG and enable
>it by default for x86?
>
>Or should I force disable it even when enabled with --enable-languages
>when
>building for an untested target?

Go is also not enabled by default.  It's to tell the user the frontend/library won't work (and thus disable the frontend even if requested).

Richard.

>
>
>Thanks,
>Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
       [not found]       ` <F38D8751-F0EB-4ADA-9DEE-A59EC43471F4@gmail.com>
@ 2017-01-14  9:26         ` Pekka Jääskeläinen
  0 siblings, 0 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-14  9:26 UTC (permalink / raw)
  To: Richard Biener; +Cc: David Edelsohn, GCC Patches, Martin Jambor

On Fri, Jan 13, 2017 at 11:36 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> Ah, with fibers fixed there's only the fp16.c part left.  Presumably LGPL overall is OK as well (but I'm not a lawyer either).

Seems fp16.c has the GPL3 runtime exception in place, so I believe we
are good here license-wise:

"Under Section 7 of GPL version 3, you are granted additional
   permissions described in the GCC Runtime Library Exception, version
   3.1, as published by the Free Software Foundation."

BR,
Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-13 15:44     ` Pekka Jääskeläinen
  2017-01-13 21:38       ` Richard Biener
@ 2017-01-14 13:21       ` Pekka Jääskeläinen
  1 sibling, 0 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-14 13:21 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, Martin Jambor

[-- Attachment #1: Type: text/plain, Size: 2980 bytes --]

Hi Richard,

Attached is an updated BRIG FE patch set with everything else you
found corrected
except the builtin issue. It seems unclear if converting the HSAIL
instruction-based
builtins to direct runtime function declaration calls is an
improvement to the current way.

Changes to the previous in 005-diff-to-previous.patch

Thanks again for the review,
Pekka

On Fri, Jan 13, 2017 at 5:43 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> Hi Richard,
>
> Thanks for the review! Replies/questions inline.
>
> On Fri, Jan 13, 2017 at 2:28 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
>>> Hi,
>>>
>>> A gentle ping...
>>
>> diff --git a/gcc/configure.ac b/gcc/configure.ac
>> index 140b9f9..06941c5 100644
>> --- a/gcc/configure.ac
>> +++ b/gcc/configure.ac
>> @@ -996,6 +996,11 @@ if test x"$enable_hsa" = x1 ; then
>>      [Define this to enable support for generating HSAIL.])
>>  fi
>>
>> +if echo "$enable_languages" | grep "brig" > /dev/null; then
>> +  AC_DEFINE(ENABLE_BRIG_FE, 1,
>> +    [Define this to enable the BRIG (HSAIL) frontend.])
>> +fi
>> +
>>
>> this looks odd and I'd have expected this to be solely controlled via
>> --enable-languages at configure time?
>
> Yes, it is. This AC_DEFINE just adds an autoconf variable ENABLE_BRIG_FE
> using which I guard unnecessary inclusion of the brig-builtins.def in
> builtins.def in
> case BRIG FE is disabled.
>
>> @@ -1366,6 +1369,11 @@ assembler  assembler-with-cpp
>>  ada
>>  f77  f77-cpp-input f95  f95-cpp-input
>>  go
>> +<<<<<<< HEAD
>> +java
>> +brig
>> +=======
>> +>>>>>>> gcc-master
>>  @end smallexample
>>
>>  @item -x none
>>
>> unmerged hunk (java is gone).
>
> Cleaned.
>
>> diff --git a/include/hsa-interface.h b/include/hsa-interface.h
>> new file mode 100644
>> index 0000000..6765751
>> --- /dev/null
>> +++ b/include/hsa-interface.h
>> @@ -0,0 +1,630 @@
>> +/* HSA runtime API 1.0.1 representation description.
>> +   Copyright (C) 2016 Free Software Foundation, Inc.
>> +
>> ...
>>
>> this looks like a sub/superset of libgomp/plugin/hsa.h, please work on
>> retaining only one version.
>
> Merged.
>
>> Did you check whether libhsail-rt builds for all GCC targets?  If not
>> you probably want to add
>> a list where to disable the frontend and its runtime (see go / libgo
>> for an example in the
>> toplevel configure.ac).
>
> I have tested only x86 of the GCC upstream targets so far.
>
> Libgo seems to black list known broken ones with a separate --enable-libgo
> switch to force enable.  However, BRIG FE and libhsail-rt are disabled
> by default.
> Should I still add a separate switch to force enable BRIG and enable
> it by default for x86?
>
> Or should I force disable it even when enabled with --enable-languages when
> building for an untested target?
>
>
> Thanks,
> Pekka

[-- Attachment #2: 001-brig-fe-config-etc.patch.gz --]
[-- Type: application/x-gzip, Size: 144947 bytes --]

[-- Attachment #3: 002-brig-fe-gcc.patch.gz --]
[-- Type: application/x-gzip, Size: 72810 bytes --]

[-- Attachment #4: 003-brig-fe-libhsail-rt.patch.gz --]
[-- Type: application/x-gzip, Size: 17053 bytes --]

[-- Attachment #5: 004-brig-fe-testsuite.patch.gz --]
[-- Type: application/x-gzip, Size: 7269 bytes --]

[-- Attachment #6: 005-diff-to-previous.patch --]
[-- Type: text/x-patch, Size: 36030 bytes --]

diff --git a/configure b/configure
index 6ce390e..d66e219 100755
--- a/configure
+++ b/configure
@@ -3467,6 +3467,19 @@ if test x$enable_libgo = x; then
     esac
 fi
 
+# Disable the BRIG frontend and libhsail-rt on untested or known
+# broken systems. Currently it has been tested only on x86_64 Linux
+# of the upstream gcc targets. More targets shall be added after testing.
+case "${target}" in
+  x86_64-*-linux*)
+    ;;
+    *)
+    unsupported_languages="$unsupported_languages brig"
+    # This implicitly disables also target-libhsail-rt as it won't
+    # get added to the build without BRIG FE.
+    ;;
+esac
+
 # Default libgloss CPU subdirectory.
 libgloss_dir="$target_cpu"
 
diff --git a/configure.ac b/configure.ac
index 23e2277..aaa18f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -814,6 +814,19 @@ if test x$enable_libgo = x; then
     esac
 fi
 
+# Disable the BRIG frontend and libhsail-rt on untested or known
+# broken systems. Currently it has been tested only on x86_64 Linux
+# of the upstream gcc targets. More targets shall be added after testing.
+case "${target}" in
+  x86_64-*-linux*)
+    ;;
+    *)
+    unsupported_languages="$unsupported_languages brig"
+    # This implicitly disables also target-libhsail-rt as it won't
+    # get added to the build without BRIG FE.
+    ;;
+esac
+
 # Default libgloss CPU subdirectory.
 libgloss_dir="$target_cpu"
 
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 0cf2f8a..1bec440 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2594,7 +2594,10 @@ separately.
 
 Second, you must have the testing tools installed.  This includes
 @uref{http://www.gnu.org/software/dejagnu/,,DejaGnu}, Tcl, and Expect;
-the DejaGnu site has links to these.
+the DejaGnu site has links to these. For running the BRIG frontend
+tests, a tool to assemble the binary BRIGs from HSAIL text,
+@uref{https://github.com/HSAFoundation/HSAIL-Tools/,,HSAILasm} must
+be installed.
 
 If the directories where @command{runtest} and @command{expect} were
 installed are not in the @env{PATH}, you may need to set the following
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4cbca4f..4c18397 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1369,11 +1369,7 @@ assembler  assembler-with-cpp
 ada
 f77  f77-cpp-input f95  f95-cpp-input
 go
-<<<<<<< HEAD
-java
 brig
-=======
->>>>>>> gcc-master
 @end smallexample
 
 @item -x none
diff --git a/gcc/testsuite/brig.dg/README b/gcc/testsuite/brig.dg/README
index cc313c4..2ad5b24 100644
--- a/gcc/testsuite/brig.dg/README
+++ b/gcc/testsuite/brig.dg/README
@@ -7,4 +7,6 @@ suite for all HSAIL instructions. The HSA PRM conformance suite
 is supposed to be used for that.
 
 HSAILasm is required for converting the text HSAIL files to BRIGs
-which the compiler consumes.
+which the compiler consumes. It can be built from
+https://github.com/HSAFoundation/HSAIL-Tools
+
diff --git a/gcc/testsuite/brig.dg/dg.exp b/gcc/testsuite/brig.dg/dg.exp
index fd75cae..d4f37e6 100644
--- a/gcc/testsuite/brig.dg/dg.exp
+++ b/gcc/testsuite/brig.dg/dg.exp
@@ -4,12 +4,12 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
@@ -21,7 +21,11 @@ load_lib brig-dg.exp
 # Initialize `dg'.
 dg-init
 
-dg-runtest [find $srcdir/$subdir *.hsail] "" ""
+if [expr [llength [auto_execok HSAILasm]] > 0] {
+    dg-runtest [find $srcdir/$subdir *.hsail] "" ""
+} else {
+    unsupported "All BRIG FE tests require HSAILasm in PATH."
+}
 
 # All done.
 dg-finish
diff --git a/libgomp/plugin/hsa.h b/libgomp/plugin/hsa.h
deleted file mode 100644
index 6765751..0000000
--- a/libgomp/plugin/hsa.h
+++ /dev/null
@@ -1,630 +0,0 @@
-/* HSA runtime API 1.0.1 representation description.
-   Copyright (C) 2016 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.
-
-The contents of the file was created by extracting data structures, enum,
-typedef and other definitions from HSA Runtime Programmer’s Reference Manual
-Version 1.0 (http://www.hsafoundation.com/standards/).
-
-HTML version is provided on the following link:
-http://www.hsafoundation.com/html/Content/Runtime/Topics/Runtime_title_page.htm
-*/
-
-#ifndef _HSA_H
-#define _HSA_H 1
-
-#define HSA_LARGE_MODEL 1
-
-typedef struct hsa_signal_s { uint64_t handle; } hsa_signal_t;
-typedef enum {
-  HSA_QUEUE_TYPE_MULTI = 0,
-  HSA_QUEUE_TYPE_SINGLE = 1
-} hsa_queue_type_t;
-
-typedef enum { HSA_PROFILE_BASE = 0, HSA_PROFILE_FULL = 1 } hsa_profile_t;
-typedef struct hsa_region_s { uint64_t handle; } hsa_region_t;
-typedef enum {
-  HSA_EXECUTABLE_SYMBOL_INFO_TYPE = 0,
-  HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH = 1,
-  HSA_EXECUTABLE_SYMBOL_INFO_NAME = 2,
-  HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME_LENGTH = 3,
-  HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME = 4,
-  HSA_EXECUTABLE_SYMBOL_INFO_AGENT = 20,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS = 21,
-  HSA_EXECUTABLE_SYMBOL_INFO_LINKAGE = 5,
-  HSA_EXECUTABLE_SYMBOL_INFO_IS_DEFINITION = 17,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALLOCATION = 6,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SEGMENT = 7,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT = 8,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE = 9,
-  HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_IS_CONST = 10,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT = 22,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE = 11,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT = 12,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE = 13,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE = 14,
-  HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK = 15,
-  HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT = 23,
-  HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION = 16
-} hsa_executable_symbol_info_t;
-typedef enum {
-  HSA_REGION_GLOBAL_FLAG_KERNARG = 1,
-  HSA_REGION_GLOBAL_FLAG_FINE_GRAINED = 2,
-  HSA_REGION_GLOBAL_FLAG_COARSE_GRAINED = 4
-} hsa_region_global_flag_t;
-typedef struct hsa_code_object_s { uint64_t handle; } hsa_code_object_t;
-typedef enum {
-  HSA_KERNEL_DISPATCH_PACKET_SETUP_WIDTH_DIMENSIONS = 2
-} hsa_kernel_dispatch_packet_setup_width_t;
-typedef enum {
-  HSA_DEVICE_TYPE_CPU = 0,
-  HSA_DEVICE_TYPE_GPU = 1,
-  HSA_DEVICE_TYPE_DSP = 2
-} hsa_device_type_t;
-typedef enum {
-  HSA_STATUS_SUCCESS = 0x0,
-  HSA_STATUS_INFO_BREAK = 0x1,
-  HSA_STATUS_ERROR = 0x1000,
-  HSA_STATUS_ERROR_INVALID_ARGUMENT = 0x1001,
-  HSA_STATUS_ERROR_INVALID_QUEUE_CREATION = 0x1002,
-  HSA_STATUS_ERROR_INVALID_ALLOCATION = 0x1003,
-  HSA_STATUS_ERROR_INVALID_AGENT = 0x1004,
-  HSA_STATUS_ERROR_INVALID_REGION = 0x1005,
-  HSA_STATUS_ERROR_INVALID_SIGNAL = 0x1006,
-  HSA_STATUS_ERROR_INVALID_QUEUE = 0x1007,
-  HSA_STATUS_ERROR_OUT_OF_RESOURCES = 0x1008,
-  HSA_STATUS_ERROR_INVALID_PACKET_FORMAT = 0x1009,
-  HSA_STATUS_ERROR_RESOURCE_FREE = 0x100A,
-  HSA_STATUS_ERROR_NOT_INITIALIZED = 0x100B,
-  HSA_STATUS_ERROR_REFCOUNT_OVERFLOW = 0x100C,
-  HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS = 0x100D,
-  HSA_STATUS_ERROR_INVALID_INDEX = 0x100E,
-  HSA_STATUS_ERROR_INVALID_ISA = 0x100F,
-  HSA_STATUS_ERROR_INVALID_ISA_NAME = 0x1017,
-  HSA_STATUS_ERROR_INVALID_CODE_OBJECT = 0x1010,
-  HSA_STATUS_ERROR_INVALID_EXECUTABLE = 0x1011,
-  HSA_STATUS_ERROR_FROZEN_EXECUTABLE = 0x1012,
-  HSA_STATUS_ERROR_INVALID_SYMBOL_NAME = 0x1013,
-  HSA_STATUS_ERROR_VARIABLE_ALREADY_DEFINED = 0x1014,
-  HSA_STATUS_ERROR_VARIABLE_UNDEFINED = 0x1015,
-  HSA_STATUS_ERROR_EXCEPTION = 0x1016
-} hsa_status_t;
-typedef enum {
-  HSA_EXTENSION_FINALIZER = 0,
-  HSA_EXTENSION_IMAGES = 1
-} hsa_extension_t;
-typedef struct hsa_queue_s {
-  hsa_queue_type_t type;
-  uint32_t features;
-
-#ifdef HSA_LARGE_MODEL
-  void *base_address;
-#elif defined HSA_LITTLE_ENDIAN
-  void *base_address;
-  uint32_t reserved0;
-#else
-  uint32_t reserved0;
-  void *base_address;
-#endif
-
-  hsa_signal_t doorbell_signal;
-  uint32_t size;
-  uint32_t reserved1;
-  uint64_t id;
-} hsa_queue_t;
-typedef struct hsa_agent_dispatch_packet_s {
-  uint16_t header;
-  uint16_t type;
-  uint32_t reserved0;
-
-#ifdef HSA_LARGE_MODEL
-  void *return_address;
-#elif defined HSA_LITTLE_ENDIAN
-  void *return_address;
-  uint32_t reserved1;
-#else
-  uint32_t reserved1;
-  void *return_address;
-#endif
-  uint64_t arg[4];
-  uint64_t reserved2;
-  hsa_signal_t completion_signal;
-} hsa_agent_dispatch_packet_t;
-typedef enum {
-  HSA_CODE_SYMBOL_INFO_TYPE = 0,
-  HSA_CODE_SYMBOL_INFO_NAME_LENGTH = 1,
-  HSA_CODE_SYMBOL_INFO_NAME = 2,
-  HSA_CODE_SYMBOL_INFO_MODULE_NAME_LENGTH = 3,
-  HSA_CODE_SYMBOL_INFO_MODULE_NAME = 4,
-  HSA_CODE_SYMBOL_INFO_LINKAGE = 5,
-  HSA_CODE_SYMBOL_INFO_IS_DEFINITION = 17,
-  HSA_CODE_SYMBOL_INFO_VARIABLE_ALLOCATION = 6,
-  HSA_CODE_SYMBOL_INFO_VARIABLE_SEGMENT = 7,
-  HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT = 8,
-  HSA_CODE_SYMBOL_INFO_VARIABLE_SIZE = 9,
-  HSA_CODE_SYMBOL_INFO_VARIABLE_IS_CONST = 10,
-  HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE = 11,
-  HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT = 12,
-  HSA_CODE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE = 13,
-  HSA_CODE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE = 14,
-  HSA_CODE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK = 15,
-  HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION = 16
-} hsa_code_symbol_info_t;
-typedef enum {
-  HSA_QUEUE_FEATURE_KERNEL_DISPATCH = 1,
-  HSA_QUEUE_FEATURE_AGENT_DISPATCH = 2
-} hsa_queue_feature_t;
-typedef enum {
-  HSA_VARIABLE_ALLOCATION_AGENT = 0,
-  HSA_VARIABLE_ALLOCATION_PROGRAM = 1
-} hsa_variable_allocation_t;
-typedef enum {
-  HSA_FENCE_SCOPE_NONE = 0,
-  HSA_FENCE_SCOPE_AGENT = 1,
-  HSA_FENCE_SCOPE_SYSTEM = 2
-} hsa_fence_scope_t;
-typedef struct hsa_agent_s { uint64_t handle; } hsa_agent_t;
-typedef enum { HSA_CODE_OBJECT_TYPE_PROGRAM = 0 } hsa_code_object_type_t;
-typedef enum {
-  HSA_SIGNAL_CONDITION_EQ = 0,
-  HSA_SIGNAL_CONDITION_NE = 1,
-  HSA_SIGNAL_CONDITION_LT = 2,
-  HSA_SIGNAL_CONDITION_GTE = 3
-} hsa_signal_condition_t;
-typedef enum {
-  HSA_EXECUTABLE_STATE_UNFROZEN = 0,
-  HSA_EXECUTABLE_STATE_FROZEN = 1
-} hsa_executable_state_t;
-typedef enum {
-  HSA_ENDIANNESS_LITTLE = 0,
-  HSA_ENDIANNESS_BIG = 1
-} hsa_endianness_t;
-typedef enum {
-  HSA_MACHINE_MODEL_SMALL = 0,
-  HSA_MACHINE_MODEL_LARGE = 1
-} hsa_machine_model_t;
-typedef enum {
-  HSA_AGENT_INFO_NAME = 0,
-  HSA_AGENT_INFO_VENDOR_NAME = 1,
-  HSA_AGENT_INFO_FEATURE = 2,
-  HSA_AGENT_INFO_MACHINE_MODEL = 3,
-  HSA_AGENT_INFO_PROFILE = 4,
-  HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 5,
-  HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES = 23,
-  HSA_AGENT_INFO_FAST_F16_OPERATION = 24,
-  HSA_AGENT_INFO_WAVEFRONT_SIZE = 6,
-  HSA_AGENT_INFO_WORKGROUP_MAX_DIM = 7,
-  HSA_AGENT_INFO_WORKGROUP_MAX_SIZE = 8,
-  HSA_AGENT_INFO_GRID_MAX_DIM = 9,
-  HSA_AGENT_INFO_GRID_MAX_SIZE = 10,
-  HSA_AGENT_INFO_FBARRIER_MAX_SIZE = 11,
-  HSA_AGENT_INFO_QUEUES_MAX = 12,
-  HSA_AGENT_INFO_QUEUE_MIN_SIZE = 13,
-  HSA_AGENT_INFO_QUEUE_MAX_SIZE = 14,
-  HSA_AGENT_INFO_QUEUE_TYPE = 15,
-  HSA_AGENT_INFO_NODE = 16,
-  HSA_AGENT_INFO_DEVICE = 17,
-  HSA_AGENT_INFO_CACHE_SIZE = 18,
-  HSA_AGENT_INFO_ISA = 19,
-  HSA_AGENT_INFO_EXTENSIONS = 20,
-  HSA_AGENT_INFO_VERSION_MAJOR = 21,
-  HSA_AGENT_INFO_VERSION_MINOR = 22
-} hsa_agent_info_t;
-typedef struct hsa_barrier_and_packet_s {
-  uint16_t header;
-  uint16_t reserved0;
-  uint32_t reserved1;
-  hsa_signal_t dep_signal[5];
-  uint64_t reserved2;
-  hsa_signal_t completion_signal;
-} hsa_barrier_and_packet_t;
-typedef struct hsa_dim3_s {
-  uint32_t x;
-  uint32_t y;
-  uint32_t z;
-} hsa_dim3_t;
-typedef enum {
-  HSA_ACCESS_PERMISSION_RO = 1,
-  HSA_ACCESS_PERMISSION_WO = 2,
-  HSA_ACCESS_PERMISSION_RW = 3
-} hsa_access_permission_t;
-typedef enum {
-  HSA_AGENT_FEATURE_KERNEL_DISPATCH = 1,
-  HSA_AGENT_FEATURE_AGENT_DISPATCH = 2
-} hsa_agent_feature_t;
-typedef enum {
-  HSA_WAIT_STATE_BLOCKED = 0,
-  HSA_WAIT_STATE_ACTIVE = 1
-} hsa_wait_state_t;
-typedef struct hsa_executable_s { uint64_t handle; } hsa_executable_t;
-typedef enum {
-  HSA_REGION_SEGMENT_GLOBAL = 0,
-  HSA_REGION_SEGMENT_READONLY = 1,
-  HSA_REGION_SEGMENT_PRIVATE = 2,
-  HSA_REGION_SEGMENT_GROUP = 3
-} hsa_region_segment_t;
-typedef enum {
-  HSA_REGION_INFO_SEGMENT = 0,
-  HSA_REGION_INFO_GLOBAL_FLAGS = 1,
-  HSA_REGION_INFO_SIZE = 2,
-  HSA_REGION_INFO_ALLOC_MAX_SIZE = 4,
-  HSA_REGION_INFO_RUNTIME_ALLOC_ALLOWED = 5,
-  HSA_REGION_INFO_RUNTIME_ALLOC_GRANULE = 6,
-  HSA_REGION_INFO_RUNTIME_ALLOC_ALIGNMENT = 7
-} hsa_region_info_t;
-typedef enum {
-  HSA_ISA_INFO_NAME_LENGTH = 0,
-  HSA_ISA_INFO_NAME = 1,
-  HSA_ISA_INFO_CALL_CONVENTION_COUNT = 2,
-  HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE = 3,
-  HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT = 4
-} hsa_isa_info_t;
-typedef enum {
-  HSA_VARIABLE_SEGMENT_GLOBAL = 0,
-  HSA_VARIABLE_SEGMENT_READONLY = 1
-} hsa_variable_segment_t;
-typedef struct hsa_callback_data_s { uint64_t handle; } hsa_callback_data_t;
-typedef enum {
-  HSA_SYMBOL_KIND_VARIABLE = 0,
-  HSA_SYMBOL_KIND_KERNEL = 1,
-  HSA_SYMBOL_KIND_INDIRECT_FUNCTION = 2
-} hsa_symbol_kind_t;
-typedef struct hsa_kernel_dispatch_packet_s {
-  uint16_t header;
-  uint16_t setup;
-  uint16_t workgroup_size_x;
-  uint16_t workgroup_size_y;
-  uint16_t workgroup_size_z;
-  uint16_t reserved0;
-  uint32_t grid_size_x;
-  uint32_t grid_size_y;
-  uint32_t grid_size_z;
-  uint32_t private_segment_size;
-  uint32_t group_segment_size;
-  uint64_t kernel_object;
-
-#ifdef HSA_LARGE_MODEL
-  void *kernarg_address;
-#elif defined HSA_LITTLE_ENDIAN
-  void *kernarg_address;
-  uint32_t reserved1;
-#else
-  uint32_t reserved1;
-  void *kernarg_address;
-#endif
-  uint64_t reserved2;
-  hsa_signal_t completion_signal;
-} hsa_kernel_dispatch_packet_t;
-typedef enum {
-  HSA_PACKET_TYPE_VENDOR_SPECIFIC = 0,
-  HSA_PACKET_TYPE_INVALID = 1,
-  HSA_PACKET_TYPE_KERNEL_DISPATCH = 2,
-  HSA_PACKET_TYPE_BARRIER_AND = 3,
-  HSA_PACKET_TYPE_AGENT_DISPATCH = 4,
-  HSA_PACKET_TYPE_BARRIER_OR = 5
-} hsa_packet_type_t;
-typedef enum {
-  HSA_PACKET_HEADER_TYPE = 0,
-  HSA_PACKET_HEADER_BARRIER = 8,
-  HSA_PACKET_HEADER_ACQUIRE_FENCE_SCOPE = 9,
-  HSA_PACKET_HEADER_RELEASE_FENCE_SCOPE = 11
-} hsa_packet_header_t;
-typedef struct hsa_isa_s { uint64_t handle; } hsa_isa_t;
-typedef enum {
-  HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT = 0,
-  HSA_DEFAULT_FLOAT_ROUNDING_MODE_ZERO = 1,
-  HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR = 2
-} hsa_default_float_rounding_mode_t;
-typedef struct hsa_code_symbol_s { uint64_t handle; } hsa_code_symbol_t;
-typedef struct hsa_executable_symbol_s {
-  uint64_t handle;
-} hsa_executable_symbol_t;
-#ifdef HSA_LARGE_MODEL
-typedef int64_t hsa_signal_value_t;
-#else
-typedef int32_t hsa_signal_value_t;
-#endif
-typedef enum {
-  HSA_EXCEPTION_POLICY_BREAK = 1,
-  HSA_EXCEPTION_POLICY_DETECT = 2
-} hsa_exception_policy_t;
-typedef enum {
-  HSA_SYSTEM_INFO_VERSION_MAJOR = 0,
-  HSA_SYSTEM_INFO_VERSION_MINOR = 1,
-  HSA_SYSTEM_INFO_TIMESTAMP = 2,
-  HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY = 3,
-  HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT = 4,
-  HSA_SYSTEM_INFO_ENDIANNESS = 5,
-  HSA_SYSTEM_INFO_MACHINE_MODEL = 6,
-  HSA_SYSTEM_INFO_EXTENSIONS = 7
-} hsa_system_info_t;
-typedef enum {
-  HSA_EXECUTABLE_INFO_PROFILE = 1,
-  HSA_EXECUTABLE_INFO_STATE = 2
-} hsa_executable_info_t;
-typedef enum {
-  HSA_KERNEL_DISPATCH_PACKET_SETUP_DIMENSIONS = 0
-} hsa_kernel_dispatch_packet_setup_t;
-typedef enum {
-  HSA_PACKET_HEADER_WIDTH_TYPE = 8,
-  HSA_PACKET_HEADER_WIDTH_BARRIER = 1,
-  HSA_PACKET_HEADER_WIDTH_ACQUIRE_FENCE_SCOPE = 2,
-  HSA_PACKET_HEADER_WIDTH_RELEASE_FENCE_SCOPE = 2
-} hsa_packet_header_width_t;
-typedef enum {
-  HSA_CODE_OBJECT_INFO_VERSION = 0,
-  HSA_CODE_OBJECT_INFO_TYPE = 1,
-  HSA_CODE_OBJECT_INFO_ISA = 2,
-  HSA_CODE_OBJECT_INFO_MACHINE_MODEL = 3,
-  HSA_CODE_OBJECT_INFO_PROFILE = 4,
-  HSA_CODE_OBJECT_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 5
-} hsa_code_object_info_t;
-typedef struct hsa_barrier_or_packet_s {
-  uint16_t header;
-  uint16_t reserved0;
-  uint32_t reserved1;
-  hsa_signal_t dep_signal[5];
-  uint64_t reserved2;
-  hsa_signal_t completion_signal;
-} hsa_barrier_or_packet_t;
-typedef enum {
-  HSA_SYMBOL_KIND_LINKAGE_MODULE = 0,
-  HSA_SYMBOL_KIND_LINKAGE_PROGRAM = 1,
-} hsa_symbol_kind_linkage_t;
-hsa_status_t hsa_executable_validate(hsa_executable_t executable,
-                                     uint32_t *result);
-uint64_t hsa_queue_add_write_index_acq_rel(const hsa_queue_t *queue,
-                                           uint64_t value);
-
-uint64_t hsa_queue_add_write_index_acquire(const hsa_queue_t *queue,
-                                           uint64_t value);
-
-uint64_t hsa_queue_add_write_index_relaxed(const hsa_queue_t *queue,
-                                           uint64_t value);
-
-uint64_t hsa_queue_add_write_index_release(const hsa_queue_t *queue,
-                                           uint64_t value);
-hsa_status_t hsa_shut_down();
-void hsa_signal_add_acq_rel(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_add_acquire(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_add_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_add_release(hsa_signal_t signal, hsa_signal_value_t value);
-hsa_status_t hsa_executable_readonly_variable_define(
-    hsa_executable_t executable, hsa_agent_t agent, const char *variable_name,
-    void *address);
-hsa_status_t hsa_agent_extension_supported(uint16_t extension,
-                                           hsa_agent_t agent,
-                                           uint16_t version_major,
-                                           uint16_t version_minor,
-                                           bool *result);
-hsa_signal_value_t hsa_signal_load_acquire(hsa_signal_t signal);
-
-hsa_signal_value_t hsa_signal_load_relaxed(hsa_signal_t signal);
-hsa_status_t hsa_executable_get_info(hsa_executable_t executable,
-                                     hsa_executable_info_t attribute,
-                                     void *value);
-hsa_status_t hsa_iterate_agents(hsa_status_t (*callback)(hsa_agent_t agent,
-                                                         void *data),
-                                void *data);
-void hsa_signal_subtract_acq_rel(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_subtract_acquire(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_subtract_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_subtract_release(hsa_signal_t signal, hsa_signal_value_t value);
-hsa_status_t
-hsa_executable_symbol_get_info(hsa_executable_symbol_t executable_symbol,
-                               hsa_executable_symbol_info_t attribute,
-                               void *value);
-void hsa_signal_xor_acq_rel(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_xor_acquire(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_xor_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_xor_release(hsa_signal_t signal, hsa_signal_value_t value);
-hsa_status_t hsa_code_object_get_info(hsa_code_object_t code_object,
-                                      hsa_code_object_info_t attribute,
-                                      void *value);
-hsa_status_t hsa_code_object_deserialize(void *serialized_code_object,
-                                         size_t serialized_code_object_size,
-                                         const char *options,
-                                         hsa_code_object_t *code_object);
-hsa_status_t hsa_status_string(hsa_status_t status, const char **status_string);
-hsa_status_t hsa_code_object_get_symbol(hsa_code_object_t code_object,
-                                        const char *symbol_name,
-                                        hsa_code_symbol_t *symbol);
-void hsa_signal_store_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_store_release(hsa_signal_t signal, hsa_signal_value_t value);
-hsa_status_t hsa_signal_destroy(hsa_signal_t signal);
-hsa_status_t hsa_system_get_extension_table(uint16_t extension,
-                                            uint16_t version_major,
-                                            uint16_t version_minor,
-                                            void *table);
-hsa_status_t hsa_agent_iterate_regions(
-    hsa_agent_t agent,
-    hsa_status_t (*callback)(hsa_region_t region, void *data), void *data);
-hsa_status_t hsa_executable_agent_global_variable_define(
-    hsa_executable_t executable, hsa_agent_t agent, const char *variable_name,
-    void *address);
-hsa_status_t hsa_queue_create(hsa_agent_t agent, uint32_t size,
-                              hsa_queue_type_t type,
-                              void (*callback)(hsa_status_t status,
-                                               hsa_queue_t *source, void *data),
-                              void *data, uint32_t private_segment_size,
-                              uint32_t group_segment_size, hsa_queue_t **queue);
-hsa_status_t hsa_isa_compatible(hsa_isa_t code_object_isa, hsa_isa_t agent_isa,
-                                bool *result);
-hsa_status_t hsa_code_object_serialize(
-    hsa_code_object_t code_object,
-    hsa_status_t (*alloc_callback)(size_t size, hsa_callback_data_t data,
-                                   void **address),
-    hsa_callback_data_t callback_data, const char *options,
-    void **serialized_code_object, size_t *serialized_code_object_size);
-hsa_status_t hsa_region_get_info(hsa_region_t region,
-                                 hsa_region_info_t attribute, void *value);
-hsa_status_t hsa_executable_freeze(hsa_extension_t executable,
-                                   const char *options);
-hsa_status_t hsa_system_extension_supported(uint16_t extension,
-                                            uint16_t version_major,
-                                            uint16_t version_minor,
-                                            bool *result);
-hsa_signal_value_t hsa_signal_wait_acquire(hsa_signal_t signal,
-                                           hsa_signal_condition_t condition,
-                                           hsa_signal_value_t compare_value,
-                                           uint64_t timeout_hint,
-                                           hsa_wait_state_t wait_state_hint);
-
-hsa_signal_value_t hsa_signal_wait_relaxed(hsa_signal_t signal,
-                                           hsa_signal_condition_t condition,
-                                           hsa_signal_value_t compare_value,
-                                           uint64_t timeout_hint,
-                                           hsa_wait_state_t wait_state_hint);
-hsa_status_t hsa_memory_copy(void *dst, const void *src, size_t size);
-hsa_status_t hsa_memory_free(void *ptr);
-hsa_status_t hsa_queue_destroy(hsa_queue_t *queue);
-hsa_status_t hsa_isa_from_name(const char *name, hsa_isa_t *isa);
-hsa_status_t hsa_isa_get_info(hsa_isa_t isa, hsa_isa_info_t attribute,
-                              uint32_t index, void *value);
-hsa_status_t hsa_signal_create(hsa_signal_value_t initial_value,
-                               uint32_t num_consumers,
-                               const hsa_agent_t *consumers,
-                               hsa_signal_t *signal);
-hsa_status_t hsa_code_symbol_get_info(hsa_code_symbol_t code_symbol,
-                                      hsa_code_symbol_info_t attribute,
-                                      void *value);
-hsa_signal_value_t hsa_signal_cas_acq_rel(hsa_signal_t signal,
-                                          hsa_signal_value_t expected,
-                                          hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_cas_acquire(hsa_signal_t signal,
-                                          hsa_signal_value_t expected,
-                                          hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_cas_relaxed(hsa_signal_t signal,
-                                          hsa_signal_value_t expected,
-                                          hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_cas_release(hsa_signal_t signal,
-                                          hsa_signal_value_t expected,
-                                          hsa_signal_value_t value);
-hsa_status_t hsa_code_object_iterate_symbols(
-    hsa_code_object_t code_object,
-    hsa_status_t (*callback)(hsa_code_object_t code_object,
-                             hsa_code_symbol_t symbol, void *data),
-    void *data);
-void hsa_queue_store_read_index_relaxed(const hsa_queue_t *queue,
-                                        uint64_t value);
-
-void hsa_queue_store_read_index_release(const hsa_queue_t *queue,
-                                        uint64_t value);
-hsa_status_t hsa_memory_assign_agent(void *ptr, hsa_agent_t agent,
-                                     hsa_access_permission_t access);
-hsa_status_t hsa_queue_inactivate(hsa_queue_t *queue);
-hsa_status_t hsa_executable_get_symbol(hsa_executable_t executable,
-                                       const char *module_name,
-                                       const char *symbol_name,
-                                       hsa_agent_t agent,
-                                       int32_t call_convention,
-                                       hsa_executable_symbol_t *symbol);
-uint64_t hsa_queue_cas_write_index_acq_rel(const hsa_queue_t *queue,
-                                           uint64_t expected, uint64_t value);
-
-uint64_t hsa_queue_cas_write_index_acquire(const hsa_queue_t *queue,
-                                           uint64_t expected, uint64_t value);
-
-uint64_t hsa_queue_cas_write_index_relaxed(const hsa_queue_t *queue,
-                                           uint64_t expected, uint64_t value);
-
-uint64_t hsa_queue_cas_write_index_release(const hsa_queue_t *queue,
-                                           uint64_t expected, uint64_t value);
-void hsa_signal_and_acq_rel(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_and_acquire(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_and_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_and_release(hsa_signal_t signal, hsa_signal_value_t value);
-uint64_t hsa_queue_load_read_index_acquire(const hsa_queue_t *queue);
-
-uint64_t hsa_queue_load_read_index_relaxed(const hsa_queue_t *queue);
-hsa_status_t hsa_executable_load_code_object(hsa_executable_t executable,
-                                             hsa_agent_t agent,
-                                             hsa_code_object_t code_object,
-                                             const char *options);
-uint64_t hsa_queue_load_write_index_acquire(const hsa_queue_t *queue);
-
-uint64_t hsa_queue_load_write_index_relaxed(const hsa_queue_t *queue);
-hsa_status_t hsa_agent_get_exception_policies(hsa_agent_t agent,
-                                              hsa_profile_t profile,
-                                              uint16_t *mask);
-hsa_status_t hsa_memory_deregister(void *ptr, size_t size);
-void hsa_signal_or_acq_rel(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_or_acquire(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_or_relaxed(hsa_signal_t signal, hsa_signal_value_t value);
-
-void hsa_signal_or_release(hsa_signal_t signal, hsa_signal_value_t value);
-hsa_status_t hsa_soft_queue_create(hsa_region_t region, uint32_t size,
-                                   hsa_queue_type_t type, uint32_t features,
-                                   hsa_signal_t doorbell_signal,
-                                   hsa_queue_t **queue);
-hsa_status_t hsa_executable_iterate_symbols(
-    hsa_executable_t executable,
-    hsa_status_t (*callback)(hsa_executable_t executable,
-                             hsa_executable_symbol_t symbol, void *data),
-    void *data);
-hsa_status_t hsa_memory_register(void *ptr, size_t size);
-void hsa_queue_store_write_index_relaxed(const hsa_queue_t *queue,
-                                         uint64_t value);
-
-void hsa_queue_store_write_index_release(const hsa_queue_t *queue,
-                                         uint64_t value);
-hsa_status_t hsa_executable_global_variable_define(hsa_executable_t executable,
-                                                   const char *variable_name,
-                                                   void *address);
-hsa_status_t hsa_executable_destroy(hsa_executable_t executable);
-hsa_status_t hsa_code_object_destroy(hsa_code_object_t code_object);
-hsa_status_t hsa_memory_allocate(hsa_region_t region, size_t size, void **ptr);
-hsa_signal_value_t hsa_signal_exchange_acq_rel(hsa_signal_t signal,
-                                               hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_exchange_acquire(hsa_signal_t signal,
-                                               hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_exchange_relaxed(hsa_signal_t signal,
-                                               hsa_signal_value_t value);
-
-hsa_signal_value_t hsa_signal_exchange_release(hsa_signal_t signal,
-                                               hsa_signal_value_t value);
-hsa_status_t hsa_agent_get_info(hsa_agent_t agent, hsa_agent_info_t attribute,
-                                void *value);
-hsa_status_t hsa_init();
-hsa_status_t hsa_system_get_info(hsa_system_info_t attribute, void *value);
-hsa_status_t hsa_executable_create(hsa_profile_t profile,
-                                   hsa_executable_state_t executable_state,
-                                   const char *options,
-                                   hsa_executable_t *executable);
-
-#endif /* _HSA_H */
diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c
index b829c8c..469a90d 100644
--- a/libgomp/plugin/plugin-hsa.c
+++ b/libgomp/plugin/plugin-hsa.c
@@ -34,7 +34,7 @@
 #include <pthread.h>
 #include <inttypes.h>
 #include <stdbool.h>
-#include <plugin/hsa.h>
+#include "hsa-interface.h"
 #include <plugin/hsa_ext_finalize.h>
 #include <dlfcn.h>
 #include "libgomp-plugin.h"
diff --git a/libhsail-rt/include/internal/fibers.h b/libhsail-rt/include/internal/fibers.h
index c0682e1..033146c 100644
--- a/libhsail-rt/include/internal/fibers.h
+++ b/libhsail-rt/include/internal/fibers.h
@@ -1,23 +1,27 @@
 /* fibers.h -- an extremely simple lightweight thread (fiber) implementation
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2016 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
-   This file is part of GCC.
-
-   GCC is free software; you can redistribute it and/or modify it under
-   the terms of the GNU General Public License as published by the Free
-   Software Foundation; either version 3, or (at your option) any later
-   version.
-
-   GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-   WARRANTY; without even the implied warranty of MERCHANTABILITY or
-   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-   for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GCC; see the file COPYING3.  If not see
-   <http://www.gnu.org/licenses/>.  */
+   Permission is hereby granted, free of charge, to any person obtaining a
+   copy of this software and associated documentation files
+   (the "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be included
+   in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+   USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
 
 #ifndef PHSA_RT_FIBERS_H
 #define PHSA_RT_FIBERS_H
diff --git a/libhsail-rt/rt/fibers.c b/libhsail-rt/rt/fibers.c
index 6de5dd2..a3056a9 100644
--- a/libhsail-rt/rt/fibers.c
+++ b/libhsail-rt/rt/fibers.c
@@ -3,21 +3,29 @@
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
-   This file is part of GCC.
-
-   GCC is free software; you can redistribute it and/or modify it under
-   the terms of the GNU General Public License as published by the Free
-   Software Foundation; either version 3, or (at your option) any later
-   version.
-
-   GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-   WARRANTY; without even the implied warranty of MERCHANTABILITY or
-   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-   for more details.
+   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
+   for General Processor Tech.
 
-   You should have received a copy of the GNU General Public License
-   along with GCC; see the file COPYING3.  If not see
-   <http://www.gnu.org/licenses/>.  */
+   Permission is hereby granted, free of charge, to any person obtaining a
+   copy of this software and associated documentation files
+   (the "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be included
+   in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+   USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
 
 #include <stdlib.h>
 #include <stdio.h>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-13 15:54     ` Pekka Jääskeläinen
@ 2017-01-16  8:46       ` Richard Biener
  2017-01-16  9:07         ` Jakub Jelinek
  0 siblings, 1 reply; 31+ messages in thread
From: Richard Biener @ 2017-01-16  8:46 UTC (permalink / raw)
  To: Pekka Jääskeläinen; +Cc: GCC Patches, Martin Jambor

On Fri, Jan 13, 2017 at 4:54 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> On Fri, Jan 13, 2017 at 2:34 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
>>> Hi,
>>>
>>> A gentle ping...
>>
>> Looking at 002/
>>
>> What's the reason of having brig-builtins.def?  I do not see any
>> middle-end stuff using them
>> and if you just emit calls to the runtime then you do not need
>> "builtins" for this -- just build
>> the function decls in the frontend.  The Fortran frontend has examples
>> for how to do that
>> for almost all entries to the libgfortran runtime.
>>
>> So all changes besides in brig/ look unnecessary to me.
>
> Most of the HSAIL instructions represented as builtins here are fine
> grained enough for
> them to be candidates for expanding as sensible target instruction
> sequences instead of runtime
> function calls.
>
> I understand that there is no code in any of the targets to do so yet.
> But still I wonder is it
> meaningful to convert them to direct runtime function calls -- if/when
> a target wants
> to optimize their HSAIL codegen they have to be moved back. Especially given
> the BRIG FE is not enabled by default and the inclusion of the BRIG
> builtins is done
> only if enabled, does it cause harm?

There are 187 of them (well, simple grep of DEF_HSAIL, so probably a bit less).
They aren't really documented but I guess that __hsail_bitmask_u64 for example
is really equivalent to sth like -1U >> n << m?  So I'm not sure why
you have builtins
like these represened as functions rather than as "expanded" code sequences?

If that's the ones you are talking about having special target
specific expansion.

Note that builtins add to GCC startup times and if you don't expect
people to enable
BRIG then I wonder why you are submitting it for inclusion ;)

Richard.

> BR,
> --Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-16  8:46       ` Richard Biener
@ 2017-01-16  9:07         ` Jakub Jelinek
  2017-01-16  9:42           ` Pekka Jääskeläinen
  2017-01-19 17:50           ` Pekka Jääskeläinen
  0 siblings, 2 replies; 31+ messages in thread
From: Jakub Jelinek @ 2017-01-16  9:07 UTC (permalink / raw)
  To: Richard Biener
  Cc: Pekka Jääskeläinen, GCC Patches, Martin Jambor

On Mon, Jan 16, 2017 at 09:46:43AM +0100, Richard Biener wrote:
> There are 187 of them (well, simple grep of DEF_HSAIL, so probably a bit less).
> They aren't really documented but I guess that __hsail_bitmask_u64 for example
> is really equivalent to sth like -1U >> n << m?  So I'm not sure why
> you have builtins
> like these represened as functions rather than as "expanded" code sequences?
> 
> If that's the ones you are talking about having special target
> specific expansion.
> 
> Note that builtins add to GCC startup times and if you don't expect
> people to enable
> BRIG then I wonder why you are submitting it for inclusion ;)

I guess the question is when the DEF_HSAIL* builtins are actually needed.
If the FE is separate from the other FEs, I guess it would be enough to
define those builtins
1) in the BRIG FE
2) in tree-core.h
3) in lto1 (only if any such builtin has been seen in the IL

So, perhaps define DEF_HSAIL* just to DEF_BUILTIN_STUB in builtins.def
unless already defined, and override it in the BRIG FE where you create its
builtins, and then have some routine in the middle-end similar to
initialize_sanitizer_builtins which lazily initializes the DEF_HSAIL*
builtins during LTO reading if a call to any of the builtins in the hsail
range is noticed?

	Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-16  9:07         ` Jakub Jelinek
@ 2017-01-16  9:42           ` Pekka Jääskeläinen
  2017-01-19 17:50           ` Pekka Jääskeläinen
  1 sibling, 0 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-16  9:42 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Richard Biener, GCC Patches, Martin Jambor

OK,

I'll see into adapting the Jakub's idea and also check if some of the
simplest builtins are better expanded
directly to tree nodes instead.

I'm not sure if lto support is needed though as the assumption now is
to have fully linked input to this FE
(all necessary BRIG modules fed in at build time which can be
guaranteed by the HSA finalizer runtime API)
without modules from other FEs never linked in.

Quickly testing, I couldn't measure startup time difference with the
builtins on/off, but of course there
will be some cycles wasted somewhere especially if some code in gcc
traverses all the builtins.

For the audience that might want to enable the FE, I expect the BRIG
FE to be used with x86_64
to have an HSA CPU Agent e.g. with phsa to avoid the need for a HSA
supported GPU in the
machine for developing HSA using projects, and also by other HSA
finalizer implementations
downstream or up. Hopefully this includes also finalization for
AMDGPUs or PTX in the future (if someone
is interested in implementing it). So, there might not be "mainstream
needs" currently that would
warrant enabling by default currently for masses, but hopefully more
so in the future after HSA gets
wider adoption.

Thanks,
Pekka

On Mon, Jan 16, 2017 at 11:07 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Jan 16, 2017 at 09:46:43AM +0100, Richard Biener wrote:
>> There are 187 of them (well, simple grep of DEF_HSAIL, so probably a bit less).
>> They aren't really documented but I guess that __hsail_bitmask_u64 for example
>> is really equivalent to sth like -1U >> n << m?  So I'm not sure why
>> you have builtins
>> like these represened as functions rather than as "expanded" code sequences?
>>
>> If that's the ones you are talking about having special target
>> specific expansion.
>>
>> Note that builtins add to GCC startup times and if you don't expect
>> people to enable
>> BRIG then I wonder why you are submitting it for inclusion ;)
>
> I guess the question is when the DEF_HSAIL* builtins are actually needed.
> If the FE is separate from the other FEs, I guess it would be enough to
> define those builtins
> 1) in the BRIG FE
> 2) in tree-core.h
> 3) in lto1 (only if any such builtin has been seen in the IL
>
> So, perhaps define DEF_HSAIL* just to DEF_BUILTIN_STUB in builtins.def
> unless already defined, and override it in the BRIG FE where you create its
> builtins, and then have some routine in the middle-end similar to
> initialize_sanitizer_builtins which lazily initializes the DEF_HSAIL*
> builtins during LTO reading if a call to any of the builtins in the hsail
> range is noticed?
>
>         Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-16  9:07         ` Jakub Jelinek
  2017-01-16  9:42           ` Pekka Jääskeläinen
@ 2017-01-19 17:50           ` Pekka Jääskeläinen
  2017-01-20  8:29             ` Richard Biener
  1 sibling, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-19 17:50 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Richard Biener, GCC Patches, Martin Jambor

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

Hi Jakub and Richard,

Attached is an updated BRIG FE patch which adds the HSAIL related
builtins only internally in the BRIG FE. I didn't add LTO support as I
believe it's not
useful for BRIG FE due to it always inputting fully linked BRIGs and
not mixing with
other frontends.

BR,
Pekka



On Mon, Jan 16, 2017 at 11:07 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Jan 16, 2017 at 09:46:43AM +0100, Richard Biener wrote:
>> There are 187 of them (well, simple grep of DEF_HSAIL, so probably a bit less).
>> They aren't really documented but I guess that __hsail_bitmask_u64 for example
>> is really equivalent to sth like -1U >> n << m?  So I'm not sure why
>> you have builtins
>> like these represened as functions rather than as "expanded" code sequences?
>>
>> If that's the ones you are talking about having special target
>> specific expansion.
>>
>> Note that builtins add to GCC startup times and if you don't expect
>> people to enable
>> BRIG then I wonder why you are submitting it for inclusion ;)
>
> I guess the question is when the DEF_HSAIL* builtins are actually needed.
> If the FE is separate from the other FEs, I guess it would be enough to
> define those builtins
> 1) in the BRIG FE
> 2) in tree-core.h
> 3) in lto1 (only if any such builtin has been seen in the IL
>
> So, perhaps define DEF_HSAIL* just to DEF_BUILTIN_STUB in builtins.def
> unless already defined, and override it in the BRIG FE where you create its
> builtins, and then have some routine in the middle-end similar to
> initialize_sanitizer_builtins which lazily initializes the DEF_HSAIL*
> builtins during LTO reading if a call to any of the builtins in the hsail
> range is noticed?
>
>         Jakub

[-- Attachment #2: 002-brig-fe-gcc.patch.gz --]
[-- Type: application/x-gzip, Size: 72883 bytes --]

[-- Attachment #3: 005-diff-to-previous.patch.gz --]
[-- Type: application/x-gzip, Size: 1489 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-19 17:50           ` Pekka Jääskeläinen
@ 2017-01-20  8:29             ` Richard Biener
  2017-01-20 17:45               ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Richard Biener @ 2017-01-20  8:29 UTC (permalink / raw)
  To: Pekka Jääskeläinen
  Cc: Jakub Jelinek, GCC Patches, Martin Jambor

On Thu, Jan 19, 2017 at 6:46 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> Hi Jakub and Richard,
>
> Attached is an updated BRIG FE patch which adds the HSAIL related
> builtins only internally in the BRIG FE. I didn't add LTO support as I
> believe it's not
> useful for BRIG FE due to it always inputting fully linked BRIGs and
> not mixing with
> other frontends.

So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
configury for it).

Otherwise this looks ok to me then.

Thanks,
Richard.

> BR,
> Pekka
>
>
>
> On Mon, Jan 16, 2017 at 11:07 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Mon, Jan 16, 2017 at 09:46:43AM +0100, Richard Biener wrote:
>>> There are 187 of them (well, simple grep of DEF_HSAIL, so probably a bit less).
>>> They aren't really documented but I guess that __hsail_bitmask_u64 for example
>>> is really equivalent to sth like -1U >> n << m?  So I'm not sure why
>>> you have builtins
>>> like these represened as functions rather than as "expanded" code sequences?
>>>
>>> If that's the ones you are talking about having special target
>>> specific expansion.
>>>
>>> Note that builtins add to GCC startup times and if you don't expect
>>> people to enable
>>> BRIG then I wonder why you are submitting it for inclusion ;)
>>
>> I guess the question is when the DEF_HSAIL* builtins are actually needed.
>> If the FE is separate from the other FEs, I guess it would be enough to
>> define those builtins
>> 1) in the BRIG FE
>> 2) in tree-core.h
>> 3) in lto1 (only if any such builtin has been seen in the IL
>>
>> So, perhaps define DEF_HSAIL* just to DEF_BUILTIN_STUB in builtins.def
>> unless already defined, and override it in the BRIG FE where you create its
>> builtins, and then have some routine in the middle-end similar to
>> initialize_sanitizer_builtins which lazily initializes the DEF_HSAIL*
>> builtins during LTO reading if a call to any of the builtins in the hsail
>> range is noticed?
>>
>>         Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-20  8:29             ` Richard Biener
@ 2017-01-20 17:45               ` Pekka Jääskeläinen
  2017-01-23 12:02                 ` Richard Biener
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-20 17:45 UTC (permalink / raw)
  To: Richard Biener; +Cc: Jakub Jelinek, GCC Patches, Martin Jambor

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Hi Richard,

On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
> configury for it).
>
> Otherwise this looks ok to me then.

Attached is a patch set with that unnecessary ENABLE_BRIG_FE macro
removed.  It has also been refreshed to the latest trunk.

Thanks,
Pekka

[-- Attachment #2: 001-brig-fe-config-etc.patch.gz --]
[-- Type: application/x-gzip, Size: 139890 bytes --]

[-- Attachment #3: 002-brig-fe-gcc.patch.gz --]
[-- Type: application/x-gzip, Size: 72762 bytes --]

[-- Attachment #4: 003-brig-fe-libhsail-rt.patch.gz --]
[-- Type: application/x-gzip, Size: 17055 bytes --]

[-- Attachment #5: 004-brig-fe-testsuite.patch.gz --]
[-- Type: application/x-gzip, Size: 7269 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-20 17:45               ` Pekka Jääskeläinen
@ 2017-01-23 12:02                 ` Richard Biener
  2017-01-23 12:04                   ` Martin Jambor
  0 siblings, 1 reply; 31+ messages in thread
From: Richard Biener @ 2017-01-23 12:02 UTC (permalink / raw)
  To: Pekka Jääskeläinen
  Cc: Jakub Jelinek, GCC Patches, Martin Jambor

On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> Hi Richard,
>
> On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
>> configury for it).
>>
>> Otherwise this looks ok to me then.
>
> Attached is a patch set with that unnecessary ENABLE_BRIG_FE macro
> removed.  It has also been refreshed to the latest trunk.

Are you set up to commit these to trunk yourself or do you need help here?

Thanks,
Richard.

> Thanks,
> Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-23 12:02                 ` Richard Biener
@ 2017-01-23 12:04                   ` Martin Jambor
  2017-01-23 13:17                     ` Richard Biener
  0 siblings, 1 reply; 31+ messages in thread
From: Martin Jambor @ 2017-01-23 12:04 UTC (permalink / raw)
  To: Richard Biener
  Cc: Pekka Jääskeläinen, Jakub Jelinek, GCC Patches

Hi,


On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
> On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> > Hi Richard,
> >
> > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
> > <richard.guenther@gmail.com> wrote:
> >> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
> >> configury for it).
> >>
> >> Otherwise this looks ok to me then.
> >
> > Attached is a patch set with that unnecessary ENABLE_BRIG_FE macro
> > removed.  It has also been refreshed to the latest trunk.
> 
> Are you set up to commit these to trunk yourself or do you need help here?
> 

Pekka is still in the process of requesting an account at gcc.gnu.org.
We agreed that I would commit the patches.

Over Saturday and today morning, I have bootstrappet and tested them
in various configurations (although mostly on x86_64 and only a little
bit on aarch64) and (together with a "svn mv libgomp/plugin/hsa.h
include/") I have not found any issue so far.

I suppose I should go ahead (in any case, if there is any fallout,
reach out to me too, at least until Pekka gets his account).

Thanks,

Martin

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-23 12:04                   ` Martin Jambor
@ 2017-01-23 13:17                     ` Richard Biener
  2017-01-24 12:54                       ` Martin Jambor
  0 siblings, 1 reply; 31+ messages in thread
From: Richard Biener @ 2017-01-23 13:17 UTC (permalink / raw)
  To: Richard Biener, Pekka Jääskeläinen, Jakub Jelinek,
	GCC Patches

On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
>
> On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
>> On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
>> > Hi Richard,
>> >
>> > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
>> > <richard.guenther@gmail.com> wrote:
>> >> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
>> >> configury for it).
>> >>
>> >> Otherwise this looks ok to me then.
>> >
>> > Attached is a patch set with that unnecessary ENABLE_BRIG_FE macro
>> > removed.  It has also been refreshed to the latest trunk.
>>
>> Are you set up to commit these to trunk yourself or do you need help here?
>>
>
> Pekka is still in the process of requesting an account at gcc.gnu.org.
> We agreed that I would commit the patches.
>
> Over Saturday and today morning, I have bootstrappet and tested them
> in various configurations (although mostly on x86_64 and only a little
> bit on aarch64) and (together with a "svn mv libgomp/plugin/hsa.h
> include/") I have not found any issue so far.
>
> I suppose I should go ahead (in any case, if there is any fallout,
> reach out to me too, at least until Pekka gets his account).

Yes, sounds good to me.

Richard.

> Thanks,
>
> Martin
>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-23 13:17                     ` Richard Biener
@ 2017-01-24 12:54                       ` Martin Jambor
  2017-01-24 20:34                         ` David Malcolm
  2017-01-25 10:10                         ` Thomas Schwinge
  0 siblings, 2 replies; 31+ messages in thread
From: Martin Jambor @ 2017-01-24 12:54 UTC (permalink / raw)
  To: GCC Patches; +Cc: Pekka Jääskeläinen

Hi,

On Mon, Jan 23, 2017 at 02:11:37PM +0100, Richard Biener wrote:
> On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor <mjambor@suse.cz> wrote:
> > Hi,
> >
> >
> > On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
> >> On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <pekka@parmance.com> wrote:
> >> > Hi Richard,
> >> >
> >> > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
> >> > <richard.guenther@gmail.com> wrote:
> >> >> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the
> >> >> configury for it).
> >> >>
> >> >> Otherwise this looks ok to me then.
> >> >
> >> > Attached is a patch set with that unnecessary ENABLE_BRIG_FE macro
> >> > removed.  It has also been refreshed to the latest trunk.
> >>
> >> Are you set up to commit these to trunk yourself or do you need help here?
> >>
> >
> > Pekka is still in the process of requesting an account at gcc.gnu.org.
> > We agreed that I would commit the patches.
> >
> > Over Saturday and today morning, I have bootstrappet and tested them
> > in various configurations (although mostly on x86_64 and only a little
> > bit on aarch64) and (together with a "svn mv libgomp/plugin/hsa.h
> > include/") I have not found any issue so far.
> >
> > I suppose I should go ahead (in any case, if there is any fallout,
> > reach out to me too, at least until Pekka gets his account).
> 
> Yes, sounds good to me.
> 

It took me more time because I got distracted by PR 79198 and did not
want to commit another huge thing while bootstrap was still broken for
so many people with my previous patch.  Nevertheless, I have just
committed the BRIG FE as revision 244867.

I tried to be careful (as well as quick to avoid conflicts) so I hope
there are no issues.  However if there are some, throw complaints my
way at least unless Pekka gets an account at gcc.gnu.org.

Thanks,

Martin

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-24 12:54                       ` Martin Jambor
@ 2017-01-24 20:34                         ` David Malcolm
  2017-01-24 20:43                           ` David Malcolm
  2017-09-17 12:13                           ` Thomas Schwinge
  2017-01-25 10:10                         ` Thomas Schwinge
  1 sibling, 2 replies; 31+ messages in thread
From: David Malcolm @ 2017-01-24 20:34 UTC (permalink / raw)
  To: Martin Jambor, GCC Patches; +Cc: Pekka Jääskeläinen

On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> Hi,
> 
> On Mon, Jan 23, 2017 at 02:11:37PM +0100, Richard Biener wrote:
> > On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor <mjambor@suse.cz>
> > wrote:
> > > Hi,
> > > 
> > > 
> > > On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
> > > > On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <
> > > > pekka@parmance.com> wrote:
> > > > > Hi Richard,
> > > > > 
> > > > > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
> > > > > <richard.guenther@gmail.com> wrote:
> > > > > > So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore
> > > > > > (nor the
> > > > > > configury for it).
> > > > > > 
> > > > > > Otherwise this looks ok to me then.
> > > > > 
> > > > > Attached is a patch set with that unnecessary ENABLE_BRIG_FE
> > > > > macro
> > > > > removed.  It has also been refreshed to the latest trunk.
> > > > 
> > > > Are you set up to commit these to trunk yourself or do you need
> > > > help here?
> > > > 
> > > 
> > > Pekka is still in the process of requesting an account at
> > > gcc.gnu.org.
> > > We agreed that I would commit the patches.
> > > 
> > > Over Saturday and today morning, I have bootstrappet and tested
> > > them
> > > in various configurations (although mostly on x86_64 and only a
> > > little
> > > bit on aarch64) and (together with a "svn mv libgomp/plugin/hsa.h
> > > include/") I have not found any issue so far.
> > > 
> > > I suppose I should go ahead (in any case, if there is any
> > > fallout,
> > > reach out to me too, at least until Pekka gets his account).
> > 
> > Yes, sounds good to me.
> > 
> 
> It took me more time because I got distracted by PR 79198 and did not
> want to commit another huge thing while bootstrap was still broken
> for
> so many people with my previous patch.  Nevertheless, I have just
> committed the BRIG FE as revision 244867.
> 
> I tried to be careful (as well as quick to avoid conflicts) so I hope
> there are no issues.  However if there are some, throw complaints my
> way at least unless Pekka gets an account at gcc.gnu.org.
> 
> Thanks,

A deps issue for the docs I noticed when glancing through the commit:

diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
new file mode 100644 (file)
index 0000000..b85b1b0
--- /dev/null
+++ b/gcc/brig/Make-lang.in

[...snip...]

+# Documentation.
+
+GO_TEXI_FILES = \
+       brig/gccbrig.texi \
+       $(gcc_docdir)/include/fdl.texi \
+       $(gcc_docdir)/include/gpl_v3.texi \
+       $(gcc_docdir)/include/gcc-common.texi \
+       gcc-vers.texi

Presumably this should be BRIG_TEXI_FILES, rather than GO_TEXI_FILES?

+# doc/gccbrig.info: $(BRIG_TEXI_FILES)
+#      if test "x$(BUILD_INFO)" = xinfo; then \
+#        rm -f doc/gccbrig.info*; \
+#        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+#              -I $(gcc_docdir)/include -o $@ $<; \
+#      else true; fi
+
+# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
+#      $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
+
+# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
+#      $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
+
+$(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
+       $(mkinstalldirs) $(@D)
+       rm -f $(@D)/*
+       $(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
+               -I $(srcdir)/brig -o $(@D) $<

...for use in describing the deps of the above.

Dave

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-24 20:34                         ` David Malcolm
@ 2017-01-24 20:43                           ` David Malcolm
  2017-09-17 12:13                           ` Thomas Schwinge
  1 sibling, 0 replies; 31+ messages in thread
From: David Malcolm @ 2017-01-24 20:43 UTC (permalink / raw)
  To: Martin Jambor, GCC Patches; +Cc: Pekka Jääskeläinen

On Tue, 2017-01-24 at 15:30 -0500, David Malcolm wrote:
> On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> > Hi,
> > 
> > On Mon, Jan 23, 2017 at 02:11:37PM +0100, Richard Biener wrote:
> > > On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor <mjambor@suse.cz>
> > > wrote:
> > > > Hi,
> > > > 
> > > > 
> > > > On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
> > > > > On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen <
> > > > > pekka@parmance.com> wrote:
> > > > > > Hi Richard,
> > > > > > 
> > > > > > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener
> > > > > > <richard.guenther@gmail.com> wrote:
> > > > > > > So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore
> > > > > > > (nor the
> > > > > > > configury for it).
> > > > > > > 
> > > > > > > Otherwise this looks ok to me then.
> > > > > > 
> > > > > > Attached is a patch set with that unnecessary
> > > > > > ENABLE_BRIG_FE
> > > > > > macro
> > > > > > removed.  It has also been refreshed to the latest trunk.
> > > > > 
> > > > > Are you set up to commit these to trunk yourself or do you
> > > > > need
> > > > > help here?
> > > > > 
> > > > 
> > > > Pekka is still in the process of requesting an account at
> > > > gcc.gnu.org.
> > > > We agreed that I would commit the patches.
> > > > 
> > > > Over Saturday and today morning, I have bootstrappet and tested
> > > > them
> > > > in various configurations (although mostly on x86_64 and only a
> > > > little
> > > > bit on aarch64) and (together with a "svn mv
> > > > libgomp/plugin/hsa.h
> > > > include/") I have not found any issue so far.
> > > > 
> > > > I suppose I should go ahead (in any case, if there is any
> > > > fallout,
> > > > reach out to me too, at least until Pekka gets his account).
> > > 
> > > Yes, sounds good to me.
> > > 
> > 
> > It took me more time because I got distracted by PR 79198 and did
> > not
> > want to commit another huge thing while bootstrap was still broken
> > for
> > so many people with my previous patch.  Nevertheless, I have just
> > committed the BRIG FE as revision 244867.
> > 
> > I tried to be careful (as well as quick to avoid conflicts) so I
> > hope
> > there are no issues.  However if there are some, throw complaints
> > my
> > way at least unless Pekka gets an account at gcc.gnu.org.
> > 
> > Thanks,
> 
> A deps issue for the docs I noticed when glancing through the commit:
> 
> diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
> new file mode 100644 (file)
> index 0000000..b85b1b0
> --- /dev/null
> +++ b/gcc/brig/Make-lang.in
> 
> [...snip...]
> 
> +# Documentation.
> +
> +GO_TEXI_FILES = \
> +       brig/gccbrig.texi \
> +       $(gcc_docdir)/include/fdl.texi \
> +       $(gcc_docdir)/include/gpl_v3.texi \
> +       $(gcc_docdir)/include/gcc-common.texi \
> +       gcc-vers.texi
> 
> Presumably this should be BRIG_TEXI_FILES, rather than GO_TEXI_FILES?
> 
> +# doc/gccbrig.info: $(BRIG_TEXI_FILES)
> +#      if test "x$(BUILD_INFO)" = xinfo; then \
> +#        rm -f doc/gccbrig.info*; \
> +#        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
> +#              -I $(gcc_docdir)/include -o $@ $<; \
> +#      else true; fi
> +
> +# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
> +#      $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@
> $<
> +
> +# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
> +#      $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@
> $<
> +
> +$(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
> +       $(mkinstalldirs) $(@D)
> +       rm -f $(@D)/*
> +       $(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
> +               -I $(srcdir)/brig -o $(@D) $<
> 
> ...for use in describing the deps of the above.
> 
> Dave

Also: grepping for "Copyright" in the commit: the new files mostly say:

+   Copyright (C) 2016 Free Software Foundation, Inc.

but I see at least one:

+   Copyright (C) 2015-2016 Free Software Foundation, Inc.

and some others.

Should the copyright be updated to cover 2017?


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-24 12:54                       ` Martin Jambor
  2017-01-24 20:34                         ` David Malcolm
@ 2017-01-25 10:10                         ` Thomas Schwinge
  2017-01-25 12:36                           ` Jakub Jelinek
  1 sibling, 1 reply; 31+ messages in thread
From: Thomas Schwinge @ 2017-01-25 10:10 UTC (permalink / raw)
  To: Martin Jambor, GCC Patches, Pekka Jääskeläinen

Hi!

On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor <mjambor@suse.cz> wrote:
> [BRIG front end]

"contrib/gcc_update" needs to be updated for "libhsail-rt".


Here is a patch to fix some Autotools issues in libhsail-rt (currently
testing); OK for trunk?

commit 00d64708323f74191ce5a39b223bca92295fc606
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Jan 25 10:33:56 2017 +0100

    libhsail-rt: Fix some Autotools issues
    
            * Makefile.am (ACLOCAL_AMFLAGS): Set to "-I .. -I ../config".
            * configure.ac: Don't instantiate AC_CONFIG_MACRO_DIR.
            * config.h.in: Remove stale file.
            * Makefile.in: Regenerate.
            * aclocal.m4: Regenerate.
            * configure: Regenerate.
---
 libhsail-rt/Makefile.am  |   4 +-
 libhsail-rt/Makefile.in  |  18 ++--
 libhsail-rt/aclocal.m4   |  72 ++++++++++------
 libhsail-rt/config.h.in  | 217 -----------------------------------------------
 libhsail-rt/configure    |  25 +++---
 libhsail-rt/configure.ac |   2 -
 6 files changed, 71 insertions(+), 267 deletions(-)

diff --git libhsail-rt/Makefile.am libhsail-rt/Makefile.am
index ef12df8..3f8806a 100644
--- libhsail-rt/Makefile.am
+++ libhsail-rt/Makefile.am
@@ -44,14 +44,14 @@
 
 AUTOMAKE_OPTIONS = foreign subdir-objects
 
+ACLOCAL_AMFLAGS = -I .. -I ../config
+
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 
 MAINT_CHARSET = latin1
 
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 
-ACLOCAL_AMFLAGS = -I m4
-
 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
 
 # -I/-D flags to pass when compiling.
diff --git libhsail-rt/Makefile.in libhsail-rt/Makefile.in
index 250cfbc..2e5c8df 100644
--- libhsail-rt/Makefile.in
+++ libhsail-rt/Makefile.in
@@ -97,17 +97,17 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = .
-DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/configure $(am__configure_deps) \
-	$(srcdir)/target-config.h.in $(srcdir)/../mkinstalldirs \
-	$(srcdir)/../depcomp
+DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(srcdir)/target-config.h.in \
+	$(srcdir)/../mkinstalldirs $(srcdir)/../depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
-	$(top_srcdir)/../config/multi.m4 $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -300,10 +300,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign subdir-objects
+ACLOCAL_AMFLAGS = -I .. -I ../config
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-ACLOCAL_AMFLAGS = -I m4
 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
 
 # -I/-D flags to pass when compiling.
diff --git libhsail-rt/aclocal.m4 libhsail-rt/aclocal.m4
index f77a2da..7a56c88 100644
--- libhsail-rt/aclocal.m4
+++ libhsail-rt/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -19,12 +20,15 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -57,12 +61,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -545,12 +555,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -569,8 +582,8 @@ AC_SUBST(install_sh)])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -590,7 +603,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
        [disable], [m4_define([am_maintainer_other], [enable])],
        [m4_define([am_maintainer_other], [enable])
         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
@@ -701,12 +714,15 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
@@ -729,13 +745,14 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -743,13 +760,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -825,12 +842,14 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
@@ -853,13 +872,13 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -868,13 +887,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -896,10 +915,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
@@ -970,7 +990,7 @@ AC_SUBST([am__untar])
 
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
-m4_include([../config/multi.m4])
+m4_include([../config/override.m4])
 m4_include([../libtool.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
diff --git libhsail-rt/config.h.in libhsail-rt/config.h.in
deleted file mode 100644
index 9dd4110..0000000
--- libhsail-rt/config.h.in
+++ /dev/null
@@ -1,217 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define to 1 if you have the `acosl' function. */
-#undef HAVE_ACOSL
-
-/* Define to 1 if you have the `asinl' function. */
-#undef HAVE_ASINL
-
-/* Define to 1 if you have the `atan2l' function. */
-#undef HAVE_ATAN2L
-
-/* Define to 1 if you have the `atanl' function. */
-#undef HAVE_ATANL
-
-/* Define to 1 if you have the `cosl' function. */
-#undef HAVE_COSL
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `expl' function. */
-#undef HAVE_EXPL
-
-/* Define to 1 if you have the `expm1l' function. */
-#undef HAVE_EXPM1L
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `ldexpl' function. */
-#undef HAVE_LDEXPL
-
-/* Define to 1 if you have the <linux/ether.h> header file. */
-#undef HAVE_LINUX_ETHER_H
-
-/* Define to 1 if you have the <linux/fs.h> header file. */
-#undef HAVE_LINUX_FS_H
-
-/* Define to 1 if you have the <linux/reboot.h> header file. */
-#undef HAVE_LINUX_REBOOT_H
-
-/* Define to 1 if you have the `log10l' function. */
-#undef HAVE_LOG10L
-
-/* Define to 1 if you have the `log1pl' function. */
-#undef HAVE_LOG1PL
-
-/* Define to 1 if you have the `logl' function. */
-#undef HAVE_LOGL
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <netinet/icmp6.h> header file. */
-#undef HAVE_NETINET_ICMP6_H
-
-/* Define to 1 if you have the <netinet/if_ether.h> header file. */
-#undef HAVE_NETINET_IF_ETHER_H
-
-/* Define to 1 if you have the <netinet/in_syst.h> header file. */
-#undef HAVE_NETINET_IN_SYST_H
-
-/* Define to 1 if you have the <netinet/ip.h> header file. */
-#undef HAVE_NETINET_IP_H
-
-/* Define to 1 if you have the <netinet/ip_mroute.h> header file. */
-#undef HAVE_NETINET_IP_MROUTE_H
-
-/* Define to 1 if you have the <netpacket/packet.h> header file. */
-#undef HAVE_NETPACKET_PACKET_H
-
-/* Define to 1 if you have the <net/if_arp.h> header file. */
-#undef HAVE_NET_IF_ARP_H
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define to 1 if you have the <net/route.h> header file. */
-#undef HAVE_NET_ROUTE_H
-
-/* Define to 1 if you have the <sched.h> header file. */
-#undef HAVE_SCHED_H
-
-/* Define to 1 if you have the `sinl' function. */
-#undef HAVE_SINL
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if the compiler provides the __sync_bool_compare_and_swap
-   function for uint32 */
-#undef HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4
-
-/* Define to 1 if the compiler provides the __sync_bool_compare_and_swap
-   function for uint64 */
-#undef HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8
-
-/* Define to 1 if you have the <syscall.h> header file. */
-#undef HAVE_SYSCALL_H
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/inotify.h> header file. */
-#undef HAVE_SYS_INOTIFY_H
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#undef HAVE_SYS_PRCTL_H
-
-/* Define to 1 if you have the <sys/ptrace.h> header file. */
-#undef HAVE_SYS_PTRACE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/statfs.h> header file. */
-#undef HAVE_SYS_STATFS_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#undef HAVE_SYS_SYSCALL_H
-
-/* Define to 1 if you have the <sys/sysinfo.h> header file. */
-#undef HAVE_SYS_SYSINFO_H
-
-/* Define to 1 if you have the <sys/timex.h> header file. */
-#undef HAVE_SYS_TIMEX_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/user.h> header file. */
-#undef HAVE_SYS_USER_H
-
-/* Define to 1 if you have the <sys/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define to 1 if you have the <sys/vfs.h> header file. */
-#undef HAVE_SYS_VFS_H
-
-/* Define to 1 if you have the `tanl' function. */
-#undef HAVE_TANL
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
diff --git libhsail-rt/configure libhsail-rt/configure
old mode 100644
new mode 100755
index 0c10830..34f82a5
--- libhsail-rt/configure
+++ libhsail-rt/configure
@@ -640,6 +640,7 @@ CXX
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -2403,6 +2404,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
 # Needed to define ${target}.  Needs to be very early to avoid annoying
 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
 ac_aux_dir=
@@ -3009,11 +3011,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3374,12 +3376,10 @@ done
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdio.h>
+
 int
 main ()
 {
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
@@ -3862,6 +3862,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3886,6 +3887,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -3945,7 +3947,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -4270,6 +4272,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4329,7 +4332,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -10966,7 +10969,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10969 "configure"
+#line 10972 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11072,7 +11075,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11075 "configure"
+#line 11078 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git libhsail-rt/configure.ac libhsail-rt/configure.ac
index 796e109..dc90c76 100644
--- libhsail-rt/configure.ac
+++ libhsail-rt/configure.ac
@@ -34,8 +34,6 @@
 #  POSSIBILITY OF SUCH DAMAGE.
 
 AC_INIT([phsa HSAIL runtime library], [1.0], [pekka.jaaskelainen@parmance.com])
-AC_CONFIG_MACRO_DIR([m4])
-
 AC_PREREQ([2.64])
 
 # Needed to define ${target}.  Needs to be very early to avoid annoying


Grüße
 Thomas

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-25 10:10                         ` Thomas Schwinge
@ 2017-01-25 12:36                           ` Jakub Jelinek
  2017-01-25 16:09                             ` Thomas Schwinge
  0 siblings, 1 reply; 31+ messages in thread
From: Jakub Jelinek @ 2017-01-25 12:36 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: Martin Jambor, GCC Patches, Pekka Jääskeläinen

On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote:
> Hi!
> 
> On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor <mjambor@suse.cz> wrote:
> > [BRIG front end]
> 
> "contrib/gcc_update" needs to be updated for "libhsail-rt".
> 
> 
> Here is a patch to fix some Autotools issues in libhsail-rt (currently
> testing); OK for trunk?
> 
> commit 00d64708323f74191ce5a39b223bca92295fc606
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date:   Wed Jan 25 10:33:56 2017 +0100
> 
>     libhsail-rt: Fix some Autotools issues
>     
>             * Makefile.am (ACLOCAL_AMFLAGS): Set to "-I .. -I ../config".
>             * configure.ac: Don't instantiate AC_CONFIG_MACRO_DIR.
>             * config.h.in: Remove stale file.
>             * Makefile.in: Regenerate.
>             * aclocal.m4: Regenerate.
>             * configure: Regenerate.

Note, lots of this changed in r244895, so your patch doesn't apply any
longer.  Still removing AC_CONFIG_MACRO_DIR, removing config.h.in and
regenerating whatever is affected by that (most likely just configure)
is in order.

	Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-25 12:36                           ` Jakub Jelinek
@ 2017-01-25 16:09                             ` Thomas Schwinge
  2017-01-26  8:29                               ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Thomas Schwinge @ 2017-01-25 16:09 UTC (permalink / raw)
  To: Jakub Jelinek, Martin Jambor, GCC Patches,
	Pekka Jääskeläinen

Hi!

On Wed, 25 Jan 2017 13:21:13 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote:
> > On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor <mjambor@suse.cz> wrote:
> > > [BRIG front end]

    $ git grep --cached libbrig
    gcc/brig/config-lang.in:target_libs="target-libbrig target-libhsail-rt"

What is "libbrig"; should we remove that (as far as I can tell?) stale
reference?


    $ git show 55a56509bb4ae0c844c27f0679a22844bed3a3c5 -- libhsail-rt/README | filterdiff
    --- /dev/null
    +++ libhsail-rt/README
    @@ -0,0 +1,4 @@
    +Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
    +You might need to manually tweak the minor automake version number
    +in configure.ac and aclocal.m4 (search for 1.11.6) in case your
    +local 1.11 minor version doesn't match. 
    \ No newline at end of file

I don't understand that "manually tweak" comment -- you should just
install/build the right versions, and run "PATH=[...]:$PATH autoreconf",
which is the same for all GCC subdirectories.

Instead, the README file should contain a note what the "libhsail-rt"
directory is about.


    $ git show 55a56509bb4ae0c844c27f0679a22844bed3a3c5 -- gcc/builtin-types.def | filterdiff --hunks=1
    diff --git gcc/builtin-types.def gcc/builtin-types.def
    index 91745b4..ee6d052 100644
    --- gcc/builtin-types.def
    +++ gcc/builtin-types.def
    @@ -67,7 +67,10 @@ DEF_PRIMITIVE_TYPE (BT_LONGLONG, long_long_integer_type_node)
     DEF_PRIMITIVE_TYPE (BT_ULONGLONG, long_long_unsigned_type_node)
     DEF_PRIMITIVE_TYPE (BT_INTMAX, intmax_type_node)
     DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
    -DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
    +DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
    +DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
    +DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
    +DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
     DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
     DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
     DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))

Is that change alright?  For instance, uint16_type_node is still used
elsewhere.  Some of these intN/uintN type_nodes apparently don't exist as
global_trees; should they, and then be referred to here instead of the
C-like type_nodes?


The "News" section on <https://gcc.gnu.org/>, and
<https://gcc.gnu.org/gcc-7/changes.html> should also be updated, I guess?
:-)


By the way, see <https://gcc.gnu.org/PR79227> "Questionable
-Wmisleading-indentation diagnostic in HSAIL-Tools" for a build problem
with HSAILasm that I ran into.  With that resolved (trivial), I'm
reporting from "gcc/testsuite/brig/brig.sum": "# of expected passes 95".

Just one concern there is output like:

    [...]
    PASS: brig.dg/test/gimple/mem.hsail (test for excess errors)
    PASS: mem.hsail.brig scan-tree-dump original "__args;[\n ]+d0 ="
    PASS: mem.hsail.brig scan-tree-dump original "\\(__args \\+ 8\\);[\n ]+d2 ="
    [...]

..., that is, the "scan-tree-dump"s don't print the full filename of the
test case.  But that problem supposedly isn't specific to the BRIG test
cases.  (I may look into that later.)


> > "contrib/gcc_update" needs to be updated for "libhsail-rt".

Done.

I suppose that also contrib/update-copyright.py need to be updated?  (I
never looked into that, so don't know.)

> > Here is a patch to fix some Autotools issues in libhsail-rt (currently
> > testing); OK for trunk?

> Note, lots of this changed in r244895, so your patch doesn't apply any
> longer.  Still removing AC_CONFIG_MACRO_DIR, removing config.h.in and
> regenerating whatever is affected by that (most likely just configure)
> is in order.

Committed to trunk in r244902:

commit c8cd62c4e211f2e2bfabaf25a64842004e611797
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Jan 25 15:38:01 2017 +0000

    libhsail-rt: Fix some Autotools issues
    
            contrib/
            * gcc_update (files_and_dependencies): Care for "libhsail-rt".
    
            libhsail-rt/
            * configure.ac: Don't instantiate AC_CONFIG_MACRO_DIR.
            * configure: Regenerate.
    
            libhsail-rt/
            * config.h.in: Remove stale file.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244902 138bc75d-0d04-0410-961f-82ee72b054a4
---
 contrib/ChangeLog        |   4 +
 contrib/gcc_update       |   4 +
 libhsail-rt/ChangeLog    |  13 +++
 libhsail-rt/config.h.in  | 217 -----------------------------------------------
 libhsail-rt/configure    |   6 +-
 libhsail-rt/configure.ac |   2 -
 6 files changed, 23 insertions(+), 223 deletions(-)

diff --git contrib/ChangeLog contrib/ChangeLog
index d429beb..2f862fa 100644
--- contrib/ChangeLog
+++ contrib/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-25  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* gcc_update (files_and_dependencies): Care for "libhsail-rt".
+
 2017-01-23  Gerald Pfeifer  <gerald@pfeifer.com>
 
 	* patch_tester.sh (TESTLOGS): Remove
diff --git contrib/gcc_update contrib/gcc_update
index a3f6d26..fe643af 100755
--- contrib/gcc_update
+++ contrib/gcc_update
@@ -140,6 +140,10 @@ libgomp/testsuite/Makefile.in: libgomp/testsuite/Makefile.am libgomp/aclocal.m4
 libgomp/configure.ac: libgomp/plugin/configfrag.ac
 libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4
 libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4
+libhsail-rt/aclocal.m4: libhsail-rt/configure.ac
+libhsail-rt/Makefile.in: libhsail-rt/Makefile.am libhsail-rt/aclocal.m4
+libhsail-rt/configure: libhsail-rt/configure.ac libhsail-rt/aclocal.m4
+libhsail-rt/target-config.h.in: libhsail-rt/configure.ac libhsail-rt/aclocal.m4
 libitm/aclocal.m4: libitm/configure.ac libitm/acinclude.m4
 libitm/Makefile.in: libitm/Makefile.am libitm/aclocal.m4
 libitm/testsuite/Makefile.in: libitm/testsuite/Makefile.am libitm/aclocal.m4
diff --git libhsail-rt/ChangeLog libhsail-rt/ChangeLog
index 8264c31..0184c24 100644
--- libhsail-rt/ChangeLog
+++ libhsail-rt/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-25  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* config.h.in: Remove stale file.
+
+	* configure.ac: Don't instantiate AC_CONFIG_MACRO_DIR.
+	* configure: Regenerate.
+
 2017-01-25  Jakub Jelinek  <jakub@redhat.com>
 
 	PR other/79046
@@ -36,3 +43,9 @@
 	* rt/sat_arithmetic.c: Likewise.
 	* rt/segment.c: Likewise.
 	* rt/workitems.c: Likewise.
+\f
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git libhsail-rt/config.h.in libhsail-rt/config.h.in
deleted file mode 100644
index 9dd4110..0000000
--- libhsail-rt/config.h.in
+++ /dev/null
@@ -1,217 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define to 1 if you have the `acosl' function. */
-#undef HAVE_ACOSL
-
-/* Define to 1 if you have the `asinl' function. */
-#undef HAVE_ASINL
-
-/* Define to 1 if you have the `atan2l' function. */
-#undef HAVE_ATAN2L
-
-/* Define to 1 if you have the `atanl' function. */
-#undef HAVE_ATANL
-
-/* Define to 1 if you have the `cosl' function. */
-#undef HAVE_COSL
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `expl' function. */
-#undef HAVE_EXPL
-
-/* Define to 1 if you have the `expm1l' function. */
-#undef HAVE_EXPM1L
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `ldexpl' function. */
-#undef HAVE_LDEXPL
-
-/* Define to 1 if you have the <linux/ether.h> header file. */
-#undef HAVE_LINUX_ETHER_H
-
-/* Define to 1 if you have the <linux/fs.h> header file. */
-#undef HAVE_LINUX_FS_H
-
-/* Define to 1 if you have the <linux/reboot.h> header file. */
-#undef HAVE_LINUX_REBOOT_H
-
-/* Define to 1 if you have the `log10l' function. */
-#undef HAVE_LOG10L
-
-/* Define to 1 if you have the `log1pl' function. */
-#undef HAVE_LOG1PL
-
-/* Define to 1 if you have the `logl' function. */
-#undef HAVE_LOGL
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <netinet/icmp6.h> header file. */
-#undef HAVE_NETINET_ICMP6_H
-
-/* Define to 1 if you have the <netinet/if_ether.h> header file. */
-#undef HAVE_NETINET_IF_ETHER_H
-
-/* Define to 1 if you have the <netinet/in_syst.h> header file. */
-#undef HAVE_NETINET_IN_SYST_H
-
-/* Define to 1 if you have the <netinet/ip.h> header file. */
-#undef HAVE_NETINET_IP_H
-
-/* Define to 1 if you have the <netinet/ip_mroute.h> header file. */
-#undef HAVE_NETINET_IP_MROUTE_H
-
-/* Define to 1 if you have the <netpacket/packet.h> header file. */
-#undef HAVE_NETPACKET_PACKET_H
-
-/* Define to 1 if you have the <net/if_arp.h> header file. */
-#undef HAVE_NET_IF_ARP_H
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define to 1 if you have the <net/route.h> header file. */
-#undef HAVE_NET_ROUTE_H
-
-/* Define to 1 if you have the <sched.h> header file. */
-#undef HAVE_SCHED_H
-
-/* Define to 1 if you have the `sinl' function. */
-#undef HAVE_SINL
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if the compiler provides the __sync_bool_compare_and_swap
-   function for uint32 */
-#undef HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4
-
-/* Define to 1 if the compiler provides the __sync_bool_compare_and_swap
-   function for uint64 */
-#undef HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8
-
-/* Define to 1 if you have the <syscall.h> header file. */
-#undef HAVE_SYSCALL_H
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/inotify.h> header file. */
-#undef HAVE_SYS_INOTIFY_H
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#undef HAVE_SYS_PRCTL_H
-
-/* Define to 1 if you have the <sys/ptrace.h> header file. */
-#undef HAVE_SYS_PTRACE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/statfs.h> header file. */
-#undef HAVE_SYS_STATFS_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#undef HAVE_SYS_SYSCALL_H
-
-/* Define to 1 if you have the <sys/sysinfo.h> header file. */
-#undef HAVE_SYS_SYSINFO_H
-
-/* Define to 1 if you have the <sys/timex.h> header file. */
-#undef HAVE_SYS_TIMEX_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/user.h> header file. */
-#undef HAVE_SYS_USER_H
-
-/* Define to 1 if you have the <sys/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define to 1 if you have the <sys/vfs.h> header file. */
-#undef HAVE_SYS_VFS_H
-
-/* Define to 1 if you have the `tanl' function. */
-#undef HAVE_TANL
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
diff --git libhsail-rt/configure libhsail-rt/configure
index e62d5a0..a490125 100755
--- libhsail-rt/configure
+++ libhsail-rt/configure
@@ -2409,8 +2409,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-
 # Needed to define ${target}.  Needs to be very early to avoid annoying
 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
 ac_aux_dir=
@@ -10975,7 +10973,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10978 "configure"
+#line 10976 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11081,7 +11079,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11084 "configure"
+#line 11082 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git libhsail-rt/configure.ac libhsail-rt/configure.ac
index 95b9a4f..ed7e304 100644
--- libhsail-rt/configure.ac
+++ libhsail-rt/configure.ac
@@ -34,8 +34,6 @@
 #  POSSIBILITY OF SUCH DAMAGE.
 
 AC_INIT([phsa HSAIL runtime library], [1.0], [pekka.jaaskelainen@parmance.com])
-AC_CONFIG_MACRO_DIR([m4])
-
 AC_PREREQ([2.64])
 
 # Needed to define ${target}.  Needs to be very early to avoid annoying


Grüße
 Thomas

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-25 16:09                             ` Thomas Schwinge
@ 2017-01-26  8:29                               ` Pekka Jääskeläinen
  2017-01-26  8:57                                 ` Jakub Jelinek
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-26  8:29 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: Jakub Jelinek, Martin Jambor, GCC Patches

On Wed, Jan 25, 2017 at 6:07 PM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On Wed, 25 Jan 2017 13:21:13 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Wed, Jan 25, 2017 at 11:00:50AM +0100, Thomas Schwinge wrote:
>> > On Tue, 24 Jan 2017 13:52:10 +0100, Martin Jambor <mjambor@suse.cz> wrote:
>> > > [BRIG front end]
>
>     $ git grep --cached libbrig
>     gcc/brig/config-lang.in:target_libs="target-libbrig target-libhsail-rt"
>
> What is "libbrig"; should we remove that (as far as I can tell?) stale
> reference?

Yes, a leftover that can be removed.

>     $ git show 55a56509bb4ae0c844c27f0679a22844bed3a3c5 -- libhsail-rt/README | filterdiff
>     --- /dev/null
>     +++ libhsail-rt/README
>     @@ -0,0 +1,4 @@
>     +Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
>     +You might need to manually tweak the minor automake version number
>     +in configure.ac and aclocal.m4 (search for 1.11.6) in case your
>     +local 1.11 minor version doesn't match.
>     \ No newline at end of file
>
> I don't understand that "manually tweak" comment -- you should just
> install/build the right versions, and run "PATH=[...]:$PATH autoreconf",
> which is the same for all GCC subdirectories.

OK. I'll remove that. IIRC, I had some difficulties with getting the
exact minor versions
of autotools working together, and found out that the minor version
didn't matter
here, so left this as a note.

> Instead, the README file should contain a note what the "libhsail-rt"
> directory is about.

OK, I will add a note.

>     $ git show 55a56509bb4ae0c844c27f0679a22844bed3a3c5 -- gcc/builtin-types.def | filterdiff --hunks=1
>     diff --git gcc/builtin-types.def gcc/builtin-types.def
>     index 91745b4..ee6d052 100644
>     --- gcc/builtin-types.def
>     +++ gcc/builtin-types.def
>     @@ -67,7 +67,10 @@ DEF_PRIMITIVE_TYPE (BT_LONGLONG, long_long_integer_type_node)
>      DEF_PRIMITIVE_TYPE (BT_ULONGLONG, long_long_unsigned_type_node)
>      DEF_PRIMITIVE_TYPE (BT_INTMAX, intmax_type_node)
>      DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
>     -DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
>     +DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
>     +DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
>     +DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
>     +DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
>      DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
>      DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
>      DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))
>
> Is that change alright?  For instance, uint16_type_node is still used
> elsewhere.  Some of these intN/uintN type_nodes apparently don't exist as
> global_trees; should they, and then be referred to here instead of the
> C-like type_nodes?

Yes, it makes sense. I will fix and test this.

> The "News" section on <https://gcc.gnu.org/>, and
> <https://gcc.gnu.org/gcc-7/changes.html> should also be updated, I guess?
> :-)

Yes, of course. I will provide text.

> I suppose that also contrib/update-copyright.py need to be updated?  (I
> never looked into that, so don't know.)

Does it? The files are (c) FSF now. What should I do here exactly?

BR,
Pekka

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-26  8:29                               ` Pekka Jääskeläinen
@ 2017-01-26  8:57                                 ` Jakub Jelinek
  2017-01-26 11:35                                   ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Jakub Jelinek @ 2017-01-26  8:57 UTC (permalink / raw)
  To: Pekka Jääskeläinen
  Cc: Thomas Schwinge, Martin Jambor, GCC Patches

On Thu, Jan 26, 2017 at 09:38:23AM +0200, Pekka Jääskeläinen wrote:
> > I suppose that also contrib/update-copyright.py need to be updated?  (I
> > never looked into that, so don't know.)
> 
> Does it? The files are (c) FSF now. What should I do here exactly?

I took care of this and committed following (it updates also 3 non-brig
related files that slipped through with 2016-ish only Copyrights since
Jan 1st).

2017-01-26  Jakub Jelinek  <jakub@redhat.com>

contrib/
	* update-copyright.py: Add libhsail-rt to self.default_dirs
	and call self.add_dir on it.  Add Intel Corporation to external
	authors.
gcc/
	* brig-builtins.def: Update copyright years.
	* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
	Update copyright years.
gcc/testsuite/
	* brig.dg/dg.exp: Update copyright years.
	* lib/brig-dg.exp: Update copyright years.
	* lib/brig.exp: Update copyright years.
libhsail-rt/
	Update copyright years.
libstdc++-v3/
	* libsupc++/eh_atomics.h: Update copyright years.
	* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.

--- contrib/update-copyright.py	(revision 244917)
+++ contrib/update-copyright.py	(working copy)
@@ -663,6 +663,7 @@ class GCCCopyright (Copyright):
         self.add_external_author ('Florida State University')
         self.add_external_author ('Greg Colvin and Beman Dawes.')
         self.add_external_author ('Hewlett-Packard Company')
+        self.add_external_author ('Intel Corporation')
         self.add_external_author ('Information Technology Industry Council.')
         self.add_external_author ('James Theiler, Brian Gough')
         self.add_external_author ('Makoto Matsumoto and Takuji Nishimura,')
@@ -710,6 +711,7 @@ class GCCCmdLine (CmdLine):
         self.add_dir ('libgfortran')
         # libgo is imported from upstream.
         self.add_dir ('libgomp')
+        self.add_dir ('libhsail-rt')
         self.add_dir ('libiberty')
         self.add_dir ('libitm')
         self.add_dir ('libobjc')
@@ -735,6 +737,7 @@ class GCCCmdLine (CmdLine):
             'libgcc',
             'libgfortran',
             'libgomp',
+            'libhsail-rt',
             'libiberty',
             'libitm',
             'libobjc',
--- gcc/brig/Make-lang.in	(revision 244917)
+++ gcc/brig/Make-lang.in	(working copy)
@@ -1,7 +1,7 @@
 # Make-lang.in -- Top level -*- makefile -*- fragment for gcc BRIG (HSAIL)
 # frontend.
 
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This file is part of GCC.
 
--- gcc/brig/brig-builtins.h	(revision 244917)
+++ gcc/brig/brig-builtins.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-builtins.h -- brig builtin definitions
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
 
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
--- gcc/brig/brig-c.h	(revision 244917)
+++ gcc/brig/brig-c.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-c.h -- Header file for brig input's gcc C interface.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brig-lang.c	(revision 244917)
+++ gcc/brig/brig-lang.c	(working copy)
@@ -1,5 +1,5 @@
 /* brig-lang.c -- brig (HSAIL) input gcc interface.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-arg-block-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-arg-block-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-arg-block-handler.cc -- brig arg block start/end directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-atomic-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-atomic-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-atomic-inst-handler.cc -- brig atomic instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
 
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
--- gcc/brig/brigfrontend/brig-basic-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-basic-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-basic-inst-handler.cc -- brig basic instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-branch-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-branch-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-branch-inst-handler.cc -- brig branch instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-cmp-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-cmp-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-cmp-inst-handler.cc -- brig cmp instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-code-entry-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-code-entry-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-code-entry-handler.cc -- a gccbrig base class
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-code-entry-handler.h	(revision 244917)
+++ gcc/brig/brigfrontend/brig-code-entry-handler.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-code-entry-handler.h -- a gccbrig base class
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-comment-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-comment-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-comment-handler.cc -- brig comment directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-control-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-control-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-control-handler.cc -- brig control directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-copy-move-inst-handler.cc -- brig copy/move instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-cvt-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-cvt-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-cvt-inst-handler.cc -- brig cvt (convert) instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-fbarrier-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-fbarrier-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-fbarrier-handler.cc -- brig fbarrier directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-function-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-function-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-code-entry-handler.cc -- brig function directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-function.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-function.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-function.cc -- declaration of brig_function class.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-function.h	(revision 244917)
+++ gcc/brig/brigfrontend/brig-function.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-function.h -- declaration of brig_function class.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-inst-mod-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-inst-mod-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-inst-mod-handler.cc -- brig rounding moded instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-label-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-label-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-label-handler.cc -- brig label directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-lane-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-lane-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-lane-inst-handler.cc -- brig lane instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-machine.c	(revision 244917)
+++ gcc/brig/brigfrontend/brig-machine.c	(working copy)
@@ -1,5 +1,5 @@
 /* brig-machine.c -- gccbrig machine queries
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-machine.h	(revision 244917)
+++ gcc/brig/brigfrontend/brig-machine.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-machine.h -- gccbrig machine queries
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
--- gcc/brig/brigfrontend/brig-mem-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-mem-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-mem-inst-handler.cc -- brig memory inst handler
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-module-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-module-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-module-handler.cc -- brig module directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-queue-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-queue-inst-handler.cc	(working copy)
@@ -1,6 +1,6 @@
 /* brig-queue-inst-handler.cc -- brig user mode queue related instruction
    handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-seg-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-seg-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-seg-inst-handler.cc -- brig segment related instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-signal-inst-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-signal-inst-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-signal-inst-handler.cc -- brig signal instruction handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-to-generic.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-to-generic.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig2tree.cc -- brig to gcc generic/gimple tree conversion
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-to-generic.h	(revision 244917)
+++ gcc/brig/brigfrontend/brig-to-generic.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-to-generic.h -- brig to gcc generic conversion
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-util.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-util.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-util.cc -- gccbrig utility functions
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-util.h	(revision 244917)
+++ gcc/brig/brigfrontend/brig-util.h	(working copy)
@@ -1,5 +1,5 @@
 /* brig-util.h -- gccbrig utility functions
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/brig-variable-handler.cc	(revision 244917)
+++ gcc/brig/brigfrontend/brig-variable-handler.cc	(working copy)
@@ -1,5 +1,5 @@
 /* brig-variable-handler.cc -- brig variable directive handling
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigfrontend/phsa.h	(revision 244917)
+++ gcc/brig/brigfrontend/phsa.h	(working copy)
@@ -1,5 +1,5 @@
 /* phsa.h -- interfacing between the gcc BRIG FE and the phsa runtime
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/brigspec.c	(revision 244917)
+++ gcc/brig/brigspec.c	(working copy)
@@ -1,5 +1,5 @@
 /* brigspec.c -- Specific flags and argument handling of the gcc BRIG front end.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/config-lang.in	(revision 244917)
+++ gcc/brig/config-lang.in	(working copy)
@@ -1,6 +1,6 @@
 # config-lang.in -- Top level configure fragment for gcc BRIG (HSAIL) frontend.
 
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 # This file is part of GCC.
 
--- gcc/brig/lang-specs.h	(revision 244917)
+++ gcc/brig/lang-specs.h	(working copy)
@@ -1,5 +1,5 @@
 /* lang-specs.h -- gcc driver specs for BRIG (HSAIL) frontend.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- gcc/brig/lang.opt	(revision 244917)
+++ gcc/brig/lang.opt	(working copy)
@@ -1,6 +1,6 @@
 ; lang.opt -- Options for the gcc BRIG (HSAIL) front end.
 
-; Copyright (C) 2015 Free Software Foundation, Inc.
+; Copyright (C) 2015-2017 Free Software Foundation, Inc.
 ;
 ; This file is part of GCC.
 ;
--- gcc/brig-builtins.def	(revision 244917)
+++ gcc/brig-builtins.def	(working copy)
@@ -1,6 +1,6 @@
 /* This file contains the definitions and documentation for the
    HSAIL builtins used in the GNU compiler.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
 
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
--- gcc/config/arm/arm_acle_builtins.def	(revision 244917)
+++ gcc/config/arm/arm_acle_builtins.def	(working copy)
@@ -1,5 +1,5 @@
 /* ACLE builtin definitions for ARM.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by ARM Ltd.
 
    This file is part of GCC.
--- gcc/testsuite/brig.dg/dg.exp	(revision 244917)
+++ gcc/testsuite/brig.dg/dg.exp	(working copy)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
--- gcc/testsuite/lib/brig-dg.exp	(revision 244917)
+++ gcc/testsuite/lib/brig-dg.exp	(working copy)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
--- gcc/testsuite/lib/brig.exp	(revision 244917)
+++ gcc/testsuite/lib/brig.exp	(working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
--- libhsail-rt/include/internal/fibers.h	(revision 244917)
+++ libhsail-rt/include/internal/fibers.h	(working copy)
@@ -1,5 +1,5 @@
 /* fibers.h -- an extremely simple lightweight thread (fiber) implementation
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/include/internal/phsa-queue-interface.h	(revision 244917)
+++ libhsail-rt/include/internal/phsa-queue-interface.h	(working copy)
@@ -2,7 +2,7 @@
    representation of a user mode queue to be used with the phsa/gccbrig
    implementation.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/include/internal/phsa-rt.h	(revision 244917)
+++ libhsail-rt/include/internal/phsa-rt.h	(working copy)
@@ -1,7 +1,7 @@
 /* phsa-rt.h -- Data structures and functions of the PHSA device side runtime
    scheduler, and HSAIL built-ins.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/include/internal/workitems.h	(revision 244917)
+++ libhsail-rt/include/internal/workitems.h	(working copy)
@@ -1,7 +1,7 @@
 /* workitems.h -- Types for context data passed as hidden parameters to special
    built-ins.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/arithmetic.c	(revision 244917)
+++ libhsail-rt/rt/arithmetic.c	(working copy)
@@ -1,7 +1,7 @@
 /* arithmetic.c -- Builtins for HSAIL arithmetic instructions for which
    there is no feasible direct gcc GENERIC expression.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/atomics.c	(revision 244917)
+++ libhsail-rt/rt/atomics.c	(working copy)
@@ -1,7 +1,7 @@
 /* atomic.c -- Builtins for HSAIL atomic instructions for which
    there is no feasible direct gcc GENERIC expression.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/bitstring.c	(revision 244917)
+++ libhsail-rt/rt/bitstring.c	(working copy)
@@ -1,6 +1,6 @@
 /* bitstring.c -- Builtins for HSAIL bitstring instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/fbarrier.c	(revision 244917)
+++ libhsail-rt/rt/fbarrier.c	(working copy)
@@ -1,6 +1,6 @@
 /* fbarrier.c -- HSAIL fbarrier built-ins.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/fibers.c	(revision 244917)
+++ libhsail-rt/rt/fibers.c	(working copy)
@@ -1,9 +1,9 @@
 /* fibers.c -- extremely simple lightweight thread (fiber) implementation
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/fp16.c	(revision 244917)
+++ libhsail-rt/rt/fp16.c	(working copy)
@@ -1,7 +1,7 @@
 /* Half-float conversion routines.  Code mostly borrowed from the ARM's
    builtin function.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2017 Free Software Foundation, Inc.
    Contributed by CodeSourcery.
 
    This file is free software; you can redistribute it and/or modify it
--- libhsail-rt/rt/misc.c	(revision 244917)
+++ libhsail-rt/rt/misc.c	(working copy)
@@ -1,6 +1,6 @@
 /* misc.c -- Builtins for HSAIL misc instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/multimedia.c	(revision 244917)
+++ libhsail-rt/rt/multimedia.c	(working copy)
@@ -1,6 +1,6 @@
 /* multimedia.c -- Builtins for HSAIL multimedia instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/queue.c	(revision 244917)
+++ libhsail-rt/rt/queue.c	(working copy)
@@ -1,6 +1,6 @@
 /* queue.c -- Builtins for HSAIL queue related instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/sat_arithmetic.c	(revision 244917)
+++ libhsail-rt/rt/sat_arithmetic.c	(working copy)
@@ -1,6 +1,6 @@
 /* sat_arithmetic.c -- Builtins for HSAIL saturating arithmetic instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/segment.c	(revision 244917)
+++ libhsail-rt/rt/segment.c	(working copy)
@@ -1,6 +1,6 @@
 /* segment.c -- Builtins for HSAIL segment related instructions.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libhsail-rt/rt/workitems.c	(revision 244917)
+++ libhsail-rt/rt/workitems.c	(working copy)
@@ -2,7 +2,7 @@
    various ways and the builtin functions closely related to the
    implementation.
 
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2017 Free Software Foundation, Inc.
    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
    for General Processor Tech.
 
--- libstdc++-v3/libsupc++/eh_atomics.h	(revision 244917)
+++ libstdc++-v3/libsupc++/eh_atomics.h	(working copy)
@@ -1,6 +1,6 @@
 // Exception Handling support header for -*- C++ -*-
 
-// Copyright (C) 2016 Free Software Foundation, Inc.
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
--- libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc	(revision 244917)
+++ libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc	(working copy)
@@ -1,6 +1,6 @@
 // { dg-do compile { target c++11 } }
 
-// Copyright (C) 2016 Free Software Foundation, Inc.
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the


	Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-26  8:57                                 ` Jakub Jelinek
@ 2017-01-26 11:35                                   ` Pekka Jääskeläinen
  2017-01-26 12:05                                     ` Jakub Jelinek
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-26 11:35 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, Martin Jambor, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 30770 bytes --]

Hi,

Here's a patch which I believe should address all the pointed out BRIG
FE related issues that
have not been committed yet.

I didn't introduce new fixed width int type nodes to tree.h as that
felt too intrusive at this point.
Also, changes.html is still to add.

OK for trunk?

BR,
Pekka



On Thu, Jan 26, 2017 at 10:28 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Jan 26, 2017 at 09:38:23AM +0200, Pekka Jääskeläinen wrote:
>> > I suppose that also contrib/update-copyright.py need to be updated?  (I
>> > never looked into that, so don't know.)
>>
>> Does it? The files are (c) FSF now. What should I do here exactly?
>
> I took care of this and committed following (it updates also 3 non-brig
> related files that slipped through with 2016-ish only Copyrights since
> Jan 1st).
>
> 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>
> contrib/
>         * update-copyright.py: Add libhsail-rt to self.default_dirs
>         and call self.add_dir on it.  Add Intel Corporation to external
>         authors.
> gcc/
>         * brig-builtins.def: Update copyright years.
>         * config/arm/arm_acle_builtins.def: Update copyright years.
> gcc/brig/
>         Update copyright years.
> gcc/testsuite/
>         * brig.dg/dg.exp: Update copyright years.
>         * lib/brig-dg.exp: Update copyright years.
>         * lib/brig.exp: Update copyright years.
> libhsail-rt/
>         Update copyright years.
> libstdc++-v3/
>         * libsupc++/eh_atomics.h: Update copyright years.
>         * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.
>
> --- contrib/update-copyright.py (revision 244917)
> +++ contrib/update-copyright.py (working copy)
> @@ -663,6 +663,7 @@ class GCCCopyright (Copyright):
>          self.add_external_author ('Florida State University')
>          self.add_external_author ('Greg Colvin and Beman Dawes.')
>          self.add_external_author ('Hewlett-Packard Company')
> +        self.add_external_author ('Intel Corporation')
>          self.add_external_author ('Information Technology Industry Council.')
>          self.add_external_author ('James Theiler, Brian Gough')
>          self.add_external_author ('Makoto Matsumoto and Takuji Nishimura,')
> @@ -710,6 +711,7 @@ class GCCCmdLine (CmdLine):
>          self.add_dir ('libgfortran')
>          # libgo is imported from upstream.
>          self.add_dir ('libgomp')
> +        self.add_dir ('libhsail-rt')
>          self.add_dir ('libiberty')
>          self.add_dir ('libitm')
>          self.add_dir ('libobjc')
> @@ -735,6 +737,7 @@ class GCCCmdLine (CmdLine):
>              'libgcc',
>              'libgfortran',
>              'libgomp',
> +            'libhsail-rt',
>              'libiberty',
>              'libitm',
>              'libobjc',
> --- gcc/brig/Make-lang.in       (revision 244917)
> +++ gcc/brig/Make-lang.in       (working copy)
> @@ -1,7 +1,7 @@
>  # Make-lang.in -- Top level -*- makefile -*- fragment for gcc BRIG (HSAIL)
>  # frontend.
>
> -# Copyright (C) 2015 Free Software Foundation, Inc.
> +# Copyright (C) 2015-2017 Free Software Foundation, Inc.
>
>  # This file is part of GCC.
>
> --- gcc/brig/brig-builtins.h    (revision 244917)
> +++ gcc/brig/brig-builtins.h    (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-builtins.h -- brig builtin definitions
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
> --- gcc/brig/brig-c.h   (revision 244917)
> +++ gcc/brig/brig-c.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-c.h -- Header file for brig input's gcc C interface.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brig-lang.c        (revision 244917)
> +++ gcc/brig/brig-lang.c        (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-lang.c -- brig (HSAIL) input gcc interface.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-arg-block-handler.cc     (revision 244917)
> +++ gcc/brig/brigfrontend/brig-arg-block-handler.cc     (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-arg-block-handler.cc -- brig arg block start/end directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-atomic-inst-handler.cc   (revision 244917)
> +++ gcc/brig/brigfrontend/brig-atomic-inst-handler.cc   (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-atomic-inst-handler.cc -- brig atomic instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
> --- gcc/brig/brigfrontend/brig-basic-inst-handler.cc    (revision 244917)
> +++ gcc/brig/brigfrontend/brig-basic-inst-handler.cc    (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-basic-inst-handler.cc -- brig basic instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-branch-inst-handler.cc   (revision 244917)
> +++ gcc/brig/brigfrontend/brig-branch-inst-handler.cc   (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-branch-inst-handler.cc -- brig branch instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-cmp-inst-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-cmp-inst-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-cmp-inst-handler.cc -- brig cmp instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-code-entry-handler.cc    (revision 244917)
> +++ gcc/brig/brigfrontend/brig-code-entry-handler.cc    (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-code-entry-handler.cc -- a gccbrig base class
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-code-entry-handler.h     (revision 244917)
> +++ gcc/brig/brigfrontend/brig-code-entry-handler.h     (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-code-entry-handler.h -- a gccbrig base class
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-comment-handler.cc       (revision 244917)
> +++ gcc/brig/brigfrontend/brig-comment-handler.cc       (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-comment-handler.cc -- brig comment directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-control-handler.cc       (revision 244917)
> +++ gcc/brig/brigfrontend/brig-control-handler.cc       (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-control-handler.cc -- brig control directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc        (revision 244917)
> +++ gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc        (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-copy-move-inst-handler.cc -- brig copy/move instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-cvt-inst-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-cvt-inst-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-cvt-inst-handler.cc -- brig cvt (convert) instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-fbarrier-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-fbarrier-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-fbarrier-handler.cc -- brig fbarrier directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-function-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-function-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-code-entry-handler.cc -- brig function directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-function.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-function.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-function.cc -- declaration of brig_function class.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-function.h       (revision 244917)
> +++ gcc/brig/brigfrontend/brig-function.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-function.h -- declaration of brig_function class.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-inst-mod-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-inst-mod-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-inst-mod-handler.cc -- brig rounding moded instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-label-handler.cc (revision 244917)
> +++ gcc/brig/brigfrontend/brig-label-handler.cc (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-label-handler.cc -- brig label directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-lane-inst-handler.cc     (revision 244917)
> +++ gcc/brig/brigfrontend/brig-lane-inst-handler.cc     (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-lane-inst-handler.cc -- brig lane instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-machine.c        (revision 244917)
> +++ gcc/brig/brigfrontend/brig-machine.c        (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-machine.c -- gccbrig machine queries
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-machine.h        (revision 244917)
> +++ gcc/brig/brigfrontend/brig-machine.h        (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-machine.h -- gccbrig machine queries
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> --- gcc/brig/brigfrontend/brig-mem-inst-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-mem-inst-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-mem-inst-handler.cc -- brig memory inst handler
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-module-handler.cc        (revision 244917)
> +++ gcc/brig/brigfrontend/brig-module-handler.cc        (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-module-handler.cc -- brig module directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-queue-inst-handler.cc    (revision 244917)
> +++ gcc/brig/brigfrontend/brig-queue-inst-handler.cc    (working copy)
> @@ -1,6 +1,6 @@
>  /* brig-queue-inst-handler.cc -- brig user mode queue related instruction
>     handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-seg-inst-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-seg-inst-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-seg-inst-handler.cc -- brig segment related instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-signal-inst-handler.cc   (revision 244917)
> +++ gcc/brig/brigfrontend/brig-signal-inst-handler.cc   (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-signal-inst-handler.cc -- brig signal instruction handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-to-generic.cc    (revision 244917)
> +++ gcc/brig/brigfrontend/brig-to-generic.cc    (working copy)
> @@ -1,5 +1,5 @@
>  /* brig2tree.cc -- brig to gcc generic/gimple tree conversion
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-to-generic.h     (revision 244917)
> +++ gcc/brig/brigfrontend/brig-to-generic.h     (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-to-generic.h -- brig to gcc generic conversion
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-util.cc  (revision 244917)
> +++ gcc/brig/brigfrontend/brig-util.cc  (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-util.cc -- gccbrig utility functions
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-util.h   (revision 244917)
> +++ gcc/brig/brigfrontend/brig-util.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-util.h -- gccbrig utility functions
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/brig-variable-handler.cc      (revision 244917)
> +++ gcc/brig/brigfrontend/brig-variable-handler.cc      (working copy)
> @@ -1,5 +1,5 @@
>  /* brig-variable-handler.cc -- brig variable directive handling
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigfrontend/phsa.h        (revision 244917)
> +++ gcc/brig/brigfrontend/phsa.h        (working copy)
> @@ -1,5 +1,5 @@
>  /* phsa.h -- interfacing between the gcc BRIG FE and the phsa runtime
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/brigspec.c (revision 244917)
> +++ gcc/brig/brigspec.c (working copy)
> @@ -1,5 +1,5 @@
>  /* brigspec.c -- Specific flags and argument handling of the gcc BRIG front end.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/config-lang.in     (revision 244917)
> +++ gcc/brig/config-lang.in     (working copy)
> @@ -1,6 +1,6 @@
>  # config-lang.in -- Top level configure fragment for gcc BRIG (HSAIL) frontend.
>
> -# Copyright (C) 2015 Free Software Foundation, Inc.
> +# Copyright (C) 2015-2017 Free Software Foundation, Inc.
>
>  # This file is part of GCC.
>
> --- gcc/brig/lang-specs.h       (revision 244917)
> +++ gcc/brig/lang-specs.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* lang-specs.h -- gcc driver specs for BRIG (HSAIL) frontend.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- gcc/brig/lang.opt   (revision 244917)
> +++ gcc/brig/lang.opt   (working copy)
> @@ -1,6 +1,6 @@
>  ; lang.opt -- Options for the gcc BRIG (HSAIL) front end.
>
> -; Copyright (C) 2015 Free Software Foundation, Inc.
> +; Copyright (C) 2015-2017 Free Software Foundation, Inc.
>  ;
>  ; This file is part of GCC.
>  ;
> --- gcc/brig-builtins.def       (revision 244917)
> +++ gcc/brig-builtins.def       (working copy)
> @@ -1,6 +1,6 @@
>  /* This file contains the definitions and documentation for the
>     HSAIL builtins used in the GNU compiler.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
> --- gcc/config/arm/arm_acle_builtins.def        (revision 244917)
> +++ gcc/config/arm/arm_acle_builtins.def        (working copy)
> @@ -1,5 +1,5 @@
>  /* ACLE builtin definitions for ARM.
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by ARM Ltd.
>
>     This file is part of GCC.
> --- gcc/testsuite/brig.dg/dg.exp        (revision 244917)
> +++ gcc/testsuite/brig.dg/dg.exp        (working copy)
> @@ -1,4 +1,4 @@
> -#   Copyright (C) 2009-2014 Free Software Foundation, Inc.
> +#   Copyright (C) 2009-2017 Free Software Foundation, Inc.
>
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> --- gcc/testsuite/lib/brig-dg.exp       (revision 244917)
> +++ gcc/testsuite/lib/brig-dg.exp       (working copy)
> @@ -1,4 +1,4 @@
> -#   Copyright (C) 2009-2014 Free Software Foundation, Inc.
> +#   Copyright (C) 2009-2017 Free Software Foundation, Inc.
>
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> --- gcc/testsuite/lib/brig.exp  (revision 244917)
> +++ gcc/testsuite/lib/brig.exp  (working copy)
> @@ -1,4 +1,4 @@
> -# Copyright (C) 2009-2016 Free Software Foundation, Inc.
> +# Copyright (C) 2009-2017 Free Software Foundation, Inc.
>
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> --- libhsail-rt/include/internal/fibers.h       (revision 244917)
> +++ libhsail-rt/include/internal/fibers.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* fibers.h -- an extremely simple lightweight thread (fiber) implementation
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/include/internal/phsa-queue-interface.h (revision 244917)
> +++ libhsail-rt/include/internal/phsa-queue-interface.h (working copy)
> @@ -2,7 +2,7 @@
>     representation of a user mode queue to be used with the phsa/gccbrig
>     implementation.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/include/internal/phsa-rt.h      (revision 244917)
> +++ libhsail-rt/include/internal/phsa-rt.h      (working copy)
> @@ -1,7 +1,7 @@
>  /* phsa-rt.h -- Data structures and functions of the PHSA device side runtime
>     scheduler, and HSAIL built-ins.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/include/internal/workitems.h    (revision 244917)
> +++ libhsail-rt/include/internal/workitems.h    (working copy)
> @@ -1,7 +1,7 @@
>  /* workitems.h -- Types for context data passed as hidden parameters to special
>     built-ins.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/arithmetic.c (revision 244917)
> +++ libhsail-rt/rt/arithmetic.c (working copy)
> @@ -1,7 +1,7 @@
>  /* arithmetic.c -- Builtins for HSAIL arithmetic instructions for which
>     there is no feasible direct gcc GENERIC expression.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/atomics.c    (revision 244917)
> +++ libhsail-rt/rt/atomics.c    (working copy)
> @@ -1,7 +1,7 @@
>  /* atomic.c -- Builtins for HSAIL atomic instructions for which
>     there is no feasible direct gcc GENERIC expression.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/bitstring.c  (revision 244917)
> +++ libhsail-rt/rt/bitstring.c  (working copy)
> @@ -1,6 +1,6 @@
>  /* bitstring.c -- Builtins for HSAIL bitstring instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/fbarrier.c   (revision 244917)
> +++ libhsail-rt/rt/fbarrier.c   (working copy)
> @@ -1,6 +1,6 @@
>  /* fbarrier.c -- HSAIL fbarrier built-ins.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/fibers.c     (revision 244917)
> +++ libhsail-rt/rt/fibers.c     (working copy)
> @@ -1,9 +1,9 @@
>  /* fibers.c -- extremely simple lightweight thread (fiber) implementation
> -   Copyright (C) 2016 Free Software Foundation, Inc.
> +   Copyright (C) 2016-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/fp16.c       (revision 244917)
> +++ libhsail-rt/rt/fp16.c       (working copy)
> @@ -1,7 +1,7 @@
>  /* Half-float conversion routines.  Code mostly borrowed from the ARM's
>     builtin function.
>
> -   Copyright (C) 2008-2015 Free Software Foundation, Inc.
> +   Copyright (C) 2008-2017 Free Software Foundation, Inc.
>     Contributed by CodeSourcery.
>
>     This file is free software; you can redistribute it and/or modify it
> --- libhsail-rt/rt/misc.c       (revision 244917)
> +++ libhsail-rt/rt/misc.c       (working copy)
> @@ -1,6 +1,6 @@
>  /* misc.c -- Builtins for HSAIL misc instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/multimedia.c (revision 244917)
> +++ libhsail-rt/rt/multimedia.c (working copy)
> @@ -1,6 +1,6 @@
>  /* multimedia.c -- Builtins for HSAIL multimedia instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/queue.c      (revision 244917)
> +++ libhsail-rt/rt/queue.c      (working copy)
> @@ -1,6 +1,6 @@
>  /* queue.c -- Builtins for HSAIL queue related instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/sat_arithmetic.c     (revision 244917)
> +++ libhsail-rt/rt/sat_arithmetic.c     (working copy)
> @@ -1,6 +1,6 @@
>  /* sat_arithmetic.c -- Builtins for HSAIL saturating arithmetic instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/segment.c    (revision 244917)
> +++ libhsail-rt/rt/segment.c    (working copy)
> @@ -1,6 +1,6 @@
>  /* segment.c -- Builtins for HSAIL segment related instructions.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libhsail-rt/rt/workitems.c  (revision 244917)
> +++ libhsail-rt/rt/workitems.c  (working copy)
> @@ -2,7 +2,7 @@
>     various ways and the builtin functions closely related to the
>     implementation.
>
> -   Copyright (C) 2015-2016 Free Software Foundation, Inc.
> +   Copyright (C) 2015-2017 Free Software Foundation, Inc.
>     Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
>     for General Processor Tech.
>
> --- libstdc++-v3/libsupc++/eh_atomics.h (revision 244917)
> +++ libstdc++-v3/libsupc++/eh_atomics.h (working copy)
> @@ -1,6 +1,6 @@
>  // Exception Handling support header for -*- C++ -*-
>
> -// Copyright (C) 2016 Free Software Foundation, Inc.
> +// Copyright (C) 2016-2017 Free Software Foundation, Inc.
>  //
>  // This file is part of GCC.
>  //
> --- libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc   (revision 244917)
> +++ libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc   (working copy)
> @@ -1,6 +1,6 @@
>  // { dg-do compile { target c++11 } }
>
> -// Copyright (C) 2016 Free Software Foundation, Inc.
> +// Copyright (C) 2016-2017 Free Software Foundation, Inc.
>  //
>  // This file is part of the GNU ISO C++ Library.  This library is free
>  // software; you can redistribute it and/or modify it under the
>
>
>         Jakub

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: brig-fe-updates.patch --]
[-- Type: text/x-patch; charset=US-ASCII; name="brig-fe-updates.patch", Size: 4277 bytes --]

diff --git a/ChangeLog b/ChangeLog
index 9695f9d..6f4f256 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* configure.ac: Added i[3456789]86-*-linux* as a supported env
+	for the BRIG FE.
+	* configure: Regenerated.
+
 2017-01-24  Pekka Jääskeläinen <pekka@parmance.com>
 	    Martin Jambor  <mjambor@suse.cz>
 
diff --git a/configure b/configure
index d757369..b62d811 100755
--- a/configure
+++ b/configure
@@ -3487,6 +3487,8 @@ fi
 # broken systems. Currently it has been tested only on x86_64 Linux
 # of the upstream gcc targets. More targets shall be added after testing.
 case "${target}" in
+  i[3456789]86-*-linux*)
+    ;;
   x86_64-*-linux*)
     ;;
     *)
diff --git a/configure.ac b/configure.ac
index 5818332..2df8e34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -817,6 +817,8 @@ fi
 # broken systems. Currently it has been tested only on x86_64 Linux
 # of the upstream gcc targets. More targets shall be added after testing.
 case "${target}" in
+  i[[3456789]]86-*-linux*)
+    ;;
   x86_64-*-linux*)
     ;;
     *)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f485bb3..d481b25 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-26  Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
+
+	* builtin-types.def: Use uint16_type_node for BT_UINT16.
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	PR middle-end/79236
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog
index d947c5a..1b24d52 100644
--- a/gcc/brig/ChangeLog
+++ b/gcc/brig/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-26  Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
+
+	Removed stale target-libbrig reference from config-lang.in
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	Update copyright years.
diff --git a/gcc/brig/config-lang.in b/gcc/brig/config-lang.in
index ab139b3..e390a16 100644
--- a/gcc/brig/config-lang.in
+++ b/gcc/brig/config-lang.in
@@ -28,7 +28,7 @@ language="brig"
 
 compilers="brig1\$(exeext)"
 
-target_libs="target-libbrig target-libhsail-rt"
+target_libs="target-libhsail-rt"
 
 # The BRIG frontend is written in C++, so we need to build the C++
 # compiler during stage 1.  Note: when cross-compiling / not bootstrapping,
diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def
index ee6d052..b065397 100644
--- a/gcc/builtin-types.def
+++ b/gcc/builtin-types.def
@@ -70,7 +70,7 @@ DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
 DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
 DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
-DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
+DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
 DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))
diff --git a/libhsail-rt/ChangeLog b/libhsail-rt/ChangeLog
index b986286..74d9269 100644
--- a/libhsail-rt/ChangeLog
+++ b/libhsail-rt/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-26  Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
+
+	* README: Added a proper description of what libhsail-rt is.
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	Update copyright years.
diff --git a/libhsail-rt/README b/libhsail-rt/README
index 2792253..64c2107 100644
--- a/libhsail-rt/README
+++ b/libhsail-rt/README
@@ -1,4 +1,10 @@
-Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
-You might need to manually tweak the minor automake version number
-in configure.ac and aclocal.m4 (search for 1.11.6) in case your
-local 1.11 minor version doesn't match. 
\ No newline at end of file
+This library implements the agent-side runtime functionality required
+to run HSA finalized programs produced by the BRIG frontend.
+
+The library contains both the code required to run kernels on the agent
+and also functions implementing more complex HSAIL instructions.
+
+rt/workitems.c contains the runtime entry function that manages multiple
+work-item execution using fibers or simple for-loops (in case of work groups
+without barriers).  Otherwise, the rest of the source files mostly contain
+functions that typically map directly to HSAIL instructions.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-26 11:35                                   ` Pekka Jääskeläinen
@ 2017-01-26 12:05                                     ` Jakub Jelinek
  2017-01-27  8:52                                       ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Jakub Jelinek @ 2017-01-26 12:05 UTC (permalink / raw)
  To: Pekka Jääskeläinen
  Cc: Thomas Schwinge, Martin Jambor, GCC Patches

Hi!

On Thu, Jan 26, 2017 at 01:30:21PM +0200, Pekka Jääskeläinen wrote:
> diff --git a/ChangeLog b/ChangeLog
> index 9695f9d..6f4f256 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2017-01-26  Pekka J????skel??inen  <pekka.jaaskelainen@parmance.com>
> +
> +	* configure.ac: Added i[3456789]86-*-linux* as a supported env
> +	for the BRIG FE.
> +	* configure: Regenerated.
> +
>  2017-01-24  Pekka J????skel??inen <pekka@parmance.com>
>  	    Martin Jambor  <mjambor@suse.cz>
>  

It might be better if this isn't present directly in toplevel configure.
Can you add libhsail-rt/configure.tgt and handle it in toplevel configure.ac
similarly to libatomic, libcilkrts, liboffloadmic, libitm, libsanitizer,
libvtv and libmpx, i.e. like:
# Disable libhsail-rt on unsupported systems.
if test -d ${srcdir}/libhsail-rt; then
    if test x$enable_libhsail-rt = x; then
        AC_MSG_CHECKING([for libhsail-rt support])
        if (srcdir=${srcdir}/libhsail-rt; \
                . ${srcdir}/configure.tgt; \
                test -n "$UNSUPPORTED")
        then
            AC_MSG_RESULT([no])
	    unsupported_languages="$unsupported_languages brig"
	    # This implicitly disables also target-libhsail-rt as it won't
	    # get added to the build without BRIG FE.
        else
            AC_MSG_RESULT([yes])
        fi
    fi
fi
or so?

> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index f485bb3..d481b25 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>

1) there should be 2 spaces rather than just one on each side of the name,
so date two spaces name two spaces <mail@address>
2) when committing, please make sure the unicode characters in your
name are actually valid UTF-8, not sure if it is my MUA or your or something
in between, but I'm just seeing ???? and ??

> --- a/gcc/brig/ChangeLog
> +++ b/gcc/brig/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>
> +
> +	Removed stale target-libbrig reference from config-lang.in
> +
>  2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>  
>  	Update copyright years.
> diff --git a/gcc/brig/config-lang.in b/gcc/brig/config-lang.in
> index ab139b3..e390a16 100644
> --- a/gcc/brig/config-lang.in
> +++ b/gcc/brig/config-lang.in
> @@ -28,7 +28,7 @@ language="brig"
>  
>  compilers="brig1\$(exeext)"
>  
> -target_libs="target-libbrig target-libhsail-rt"
> +target_libs="target-libhsail-rt"

If you are BRIG maintainer (but not listed yet in MAINTAINERS?), you can
approve this yourself.

> --- a/gcc/builtin-types.def
> +++ b/gcc/builtin-types.def
> @@ -70,7 +70,7 @@ DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
>  DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
>  DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
>  DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
> -DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
> +DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
>  DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
>  DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
>  DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))

This is ok for trunk.  Not sure about the INT8/INT16/UINT8 though,
1) char_type_node can be generally signed or unsigned, shouldn't that be
unsigned_char_type_node instead?
2) wonder what will happen on targets where char is 32-bit or similar.

> --- a/libhsail-rt/ChangeLog
> +++ b/libhsail-rt/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>
> +
> +	* README: Added a proper description of what libhsail-rt is.
> +
>  2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>  
>  	Update copyright years.
> diff --git a/libhsail-rt/README b/libhsail-rt/README
> index 2792253..64c2107 100644
> --- a/libhsail-rt/README
> +++ b/libhsail-rt/README
> @@ -1,4 +1,10 @@
> -Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
> -You might need to manually tweak the minor automake version number
> -in configure.ac and aclocal.m4 (search for 1.11.6) in case your
> -local 1.11 minor version doesn't match. 
> \ No newline at end of file
> +This library implements the agent-side runtime functionality required
> +to run HSA finalized programs produced by the BRIG frontend.
> +
> +The library contains both the code required to run kernels on the agent
> +and also functions implementing more complex HSAIL instructions.
> +
> +rt/workitems.c contains the runtime entry function that manages multiple
> +work-item execution using fibers or simple for-loops (in case of work groups
> +without barriers).  Otherwise, the rest of the source files mostly contain
> +functions that typically map directly to HSAIL instructions.

This looks good, but again, you should be able to commit without review if
you are gcc/brig and libhsail-rt maintainer.

	Jakub

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-26 12:05                                     ` Jakub Jelinek
@ 2017-01-27  8:52                                       ` Pekka Jääskeläinen
  2017-01-27 14:44                                         ` Martin Jambor
  0 siblings, 1 reply; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-01-27  8:52 UTC (permalink / raw)
  To: Jakub Jelinek, Matthias Klose; +Cc: Thomas Schwinge, Martin Jambor, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 6306 bytes --]

Hi Jakub and Matthias,

New overall patch attached. My commit access is pending so I'm relying on Martin
or someone else to get this committed for now.

Added replies inline:

On Thu, Jan 26, 2017 at 2:04 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On Thu, Jan 26, 2017 at 01:30:21PM +0200, Pekka Jääskeläinen wrote:
>> diff --git a/ChangeLog b/ChangeLog
>> index 9695f9d..6f4f256 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2017-01-26  Pekka J????skel??inen  <pekka.jaaskelainen@parmance.com>
>> +
>> +     * configure.ac: Added i[3456789]86-*-linux* as a supported env
>> +     for the BRIG FE.
>> +     * configure: Regenerated.
>> +
>>  2017-01-24  Pekka J????skel??inen <pekka@parmance.com>
>>           Martin Jambor  <mjambor@suse.cz>
>>
>
> It might be better if this isn't present directly in toplevel configure.
> Can you add libhsail-rt/configure.tgt and handle it in toplevel configure.ac
> similarly to libatomic, libcilkrts, liboffloadmic, libitm, libsanitizer,
> libvtv and libmpx, i.e. like:
> # Disable libhsail-rt on unsupported systems.
> if test -d ${srcdir}/libhsail-rt; then
>     if test x$enable_libhsail-rt = x; then
>         AC_MSG_CHECKING([for libhsail-rt support])
>         if (srcdir=${srcdir}/libhsail-rt; \
>                 . ${srcdir}/configure.tgt; \
>                 test -n "$UNSUPPORTED")
>         then
>             AC_MSG_RESULT([no])
>             unsupported_languages="$unsupported_languages brig"
>             # This implicitly disables also target-libhsail-rt as it won't
>             # get added to the build without BRIG FE.
>         else
>             AC_MSG_RESULT([yes])
>         fi
>     fi
> fi
> or so?

Done.

>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index f485bb3..d481b25 100644
>> --- a/gcc/ChangeLog
>> +++ b/gcc/ChangeLog
>> @@ -1,3 +1,7 @@
>> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>
>
> 1) there should be 2 spaces rather than just one on each side of the name,
> so date two spaces name two spaces <mail@address>

Fixed.

> 2) when committing, please make sure the unicode characters in your
> name are actually valid UTF-8, not sure if it is my MUA or your or something
> in between, but I'm just seeing ???? and ??

I believe it's your MUA or something in between. The Scandinavian
letters in my patch look
correct in an editor with UTF-8 encoding on (my emacs seems to also
have utf-8 on by default).
However, I'm not obsessed with those obscure letters so I can write my
surname Jaaskelainen
if preferred (like it's written in the copyright lines).

>> --- a/gcc/brig/ChangeLog
>> +++ b/gcc/brig/ChangeLog
>> @@ -1,3 +1,7 @@
>> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>
>> +
>> +     Removed stale target-libbrig reference from config-lang.in
>> +
>>  2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>>
>>       Update copyright years.
>> diff --git a/gcc/brig/config-lang.in b/gcc/brig/config-lang.in
>> index ab139b3..e390a16 100644
>> --- a/gcc/brig/config-lang.in
>> +++ b/gcc/brig/config-lang.in
>> @@ -28,7 +28,7 @@ language="brig"
>>
>>  compilers="brig1\$(exeext)"
>>
>> -target_libs="target-libbrig target-libhsail-rt"
>> +target_libs="target-libhsail-rt"
>
> If you are BRIG maintainer (but not listed yet in MAINTAINERS?), you can
> approve this yourself.

I added Martin and myself to MAINTAINERS for BRIG FE and libhsail-rt.

>> --- a/gcc/builtin-types.def
>> +++ b/gcc/builtin-types.def
>> @@ -70,7 +70,7 @@ DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
>> -DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
>> +DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
>>  DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))
>
> This is ok for trunk.  Not sure about the INT8/INT16/UINT8 though,
> 1) char_type_node can be generally signed or unsigned, shouldn't that be
> unsigned_char_type_node instead?

True, fixed.

> 2) wonder what will happen on targets where char is 32-bit or similar.

I wondered it myself, and I'm pretty sure BRIG FE fails in that case.
I didn't want to add new fixed width type nodes for now as I thought
it's a bit too intrusive
at this point. If BRIG FE is ported to such a platform (BTW are there
such targets in gcc
now -- just curious?) this needs to be fixed and the target white
listed in the new configure.tgt.

>> --- a/libhsail-rt/ChangeLog
>> +++ b/libhsail-rt/ChangeLog
>> @@ -1,3 +1,7 @@
>> +2017-01-26  Pekka J????skel??inen <pekka.jaaskelainen@parmance.com>
>> +
>> +     * README: Added a proper description of what libhsail-rt is.
>> +
>>  2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>>
>>       Update copyright years.
>> diff --git a/libhsail-rt/README b/libhsail-rt/README
>> index 2792253..64c2107 100644
>> --- a/libhsail-rt/README
>> +++ b/libhsail-rt/README
>> @@ -1,4 +1,10 @@
>> -Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
>> -You might need to manually tweak the minor automake version number
>> -in configure.ac and aclocal.m4 (search for 1.11.6) in case your
>> -local 1.11 minor version doesn't match.
>> \ No newline at end of file
>> +This library implements the agent-side runtime functionality required
>> +to run HSA finalized programs produced by the BRIG frontend.
>> +
>> +The library contains both the code required to run kernels on the agent
>> +and also functions implementing more complex HSAIL instructions.
>> +
>> +rt/workitems.c contains the runtime entry function that manages multiple
>> +work-item execution using fibers or simple for-loops (in case of work groups
>> +without barriers).  Otherwise, the rest of the source files mostly contain
>> +functions that typically map directly to HSAIL instructions.
>
> This looks good, but again, you should be able to commit without review if
> you are gcc/brig and libhsail-rt maintainer.

Thanks,
Pekka

[-- Attachment #2: brig-fe-updates-v2.patch --]
[-- Type: text/x-patch, Size: 11365 bytes --]

diff --git a/ChangeLog b/ChangeLog
index 9695f9d..a52f925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,15 @@
-2017-01-24  Pekka Jääskeläinen <pekka@parmance.com>
+2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* configure.ac: Moved the white list of enabling BRIG FE to
+	libhsail-rt/configure.tgt.
+
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* configure.ac: Added i[3456789]86-*-linux* as a supported env
+	for the BRIG FE.
+	* configure: Regenerated.
+
+2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
 	    Martin Jambor  <mjambor@suse.cz>
 
 
diff --git a/MAINTAINERS b/MAINTAINERS
index 0a8f0cc..ca2b181 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -143,6 +143,8 @@ C front end/ISO C99	Joseph Myers		<joseph@codesourcery.com>
 C front end/ISO C99	Richard Henderson	<rth@redhat.com>
 Ada front end		Arnaud Charlet		<charlet@adacore.com>
 Ada front end		Eric Botcazou		<ebotcazou@libertysurf.fr>
+BRIG (HSAIL) front end	Pekka Jääskeläinen	<pekka.jaaskelainen@parmance.com>
+     	     	   	Martin Jambor		<mjambor@suse.cz>
 c++			Jason Merrill		<jason@redhat.com>
 c++			Nathan Sidwell		<nathan@acm.org>
 go			Ian Lance Taylor	<ian@airs.com>
@@ -170,6 +172,8 @@ libobjc			Andrew Pinski		<pinskia@gmail.com>
 libquadmath		Tobias Burnus		<burnus@net-b.de>
 libquadmath		Jakub Jelinek		<jakub@redhat.com>
 libvtv			Caroline Tice		<cmtice@google.com>
+libhsail-rt		Pekka Jääskeläinen	<pekka.jaaskelainen@parmance.com>
+			Martin Jambor		<mjambor@suse.cz>
 line map		Dodji Seketeli		<dodji@redhat.com>
 soft-fp			Joseph Myers		<joseph@codesourcery.com>
 scheduler (+ haifa)	Jim Wilson		<wilson@tuliptree.org>
diff --git a/configure b/configure
index d757369..5a06f52 100755
--- a/configure
+++ b/configure
@@ -3304,6 +3304,26 @@ $as_echo "yes" >&6; }
     fi
 fi
 
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+    if test x$enable_libhsail_rt = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhsail-rt support" >&5
+$as_echo_n "checking for libhsail-rt support... " >&6; }
+        if (srcdir=${srcdir}/libhsail-rt; \
+                . ${srcdir}/configure.tgt; \
+                test -n "$UNSUPPORTED")
+        then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+            unsupported_languages="$unsupported_languages brig"
+            # This implicitly disables also target-libhsail-rt as it won't
+            # get added to the build without BRIG FE.
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        fi
+    fi
+fi
 
 
 # Disable libquadmath for some systems.
@@ -3483,19 +3503,6 @@ if test x$enable_libgo = x; then
     esac
 fi
 
-# Disable the BRIG frontend and libhsail-rt on untested or known
-# broken systems. Currently it has been tested only on x86_64 Linux
-# of the upstream gcc targets. More targets shall be added after testing.
-case "${target}" in
-  x86_64-*-linux*)
-    ;;
-    *)
-    unsupported_languages="$unsupported_languages brig"
-    # This implicitly disables also target-libhsail-rt as it won't
-    # get added to the build without BRIG FE.
-    ;;
-esac
-
 # Default libgloss CPU subdirectory.
 libgloss_dir="$target_cpu"
 
diff --git a/configure.ac b/configure.ac
index 5818332..17a9f17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -634,6 +634,23 @@ if test -d ${srcdir}/libmpx; then
     fi
 fi
 
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+    if test x$enable_libhsail_rt = x; then
+        AC_MSG_CHECKING([for libhsail-rt support])
+        if (srcdir=${srcdir}/libhsail-rt; \
+                . ${srcdir}/configure.tgt; \
+                test -n "$UNSUPPORTED")
+        then
+            AC_MSG_RESULT([no])
+            unsupported_languages="$unsupported_languages brig"
+            # This implicitly disables also target-libhsail-rt as it won't
+            # get added to the build without BRIG FE.
+        else
+            AC_MSG_RESULT([yes])
+        fi
+    fi
+fi
 
 
 # Disable libquadmath for some systems.
@@ -813,19 +830,6 @@ if test x$enable_libgo = x; then
     esac
 fi
 
-# Disable the BRIG frontend and libhsail-rt on untested or known
-# broken systems. Currently it has been tested only on x86_64 Linux
-# of the upstream gcc targets. More targets shall be added after testing.
-case "${target}" in
-  x86_64-*-linux*)
-    ;;
-    *)
-    unsupported_languages="$unsupported_languages brig"
-    # This implicitly disables also target-libhsail-rt as it won't
-    # get added to the build without BRIG FE.
-    ;;
-esac
-
 # Default libgloss CPU subdirectory.
 libgloss_dir="$target_cpu"
 
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f485bb3..4a61361 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* builtin-types.def: Use unsigned_char_type_node for BT_UINT8.
+	* MAINTAINERS: Updated maintainers for BRIG FE and libhsail-rt.
+
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* builtin-types.def: Use uint16_type_node for BT_UINT16.
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	PR middle-end/79236
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog
index d947c5a..fe002fe 100644
--- a/gcc/brig/ChangeLog
+++ b/gcc/brig/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	Removed stale target-libbrig reference from config-lang.in
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	Update copyright years.
diff --git a/gcc/brig/config-lang.in b/gcc/brig/config-lang.in
index ab139b3..e390a16 100644
--- a/gcc/brig/config-lang.in
+++ b/gcc/brig/config-lang.in
@@ -28,7 +28,7 @@ language="brig"
 
 compilers="brig1\$(exeext)"
 
-target_libs="target-libbrig target-libhsail-rt"
+target_libs="target-libhsail-rt"
 
 # The BRIG frontend is written in C++, so we need to build the C++
 # compiler during stage 1.  Note: when cross-compiling / not bootstrapping,
diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def
index ee6d052..ac98944 100644
--- a/gcc/builtin-types.def
+++ b/gcc/builtin-types.def
@@ -69,8 +69,8 @@ DEF_PRIMITIVE_TYPE (BT_INTMAX, intmax_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINTMAX, uintmax_type_node)
 DEF_PRIMITIVE_TYPE (BT_INT8, signed_char_type_node)
 DEF_PRIMITIVE_TYPE (BT_INT16, short_integer_type_node)
-DEF_PRIMITIVE_TYPE (BT_UINT8, char_type_node)
-DEF_PRIMITIVE_TYPE (BT_UINT16, short_unsigned_type_node)
+DEF_PRIMITIVE_TYPE (BT_UINT8, unsigned_char_type_node)
+DEF_PRIMITIVE_TYPE (BT_UINT16, uint16_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT32, uint32_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
 DEF_PRIMITIVE_TYPE (BT_WORD, (*lang_hooks.types.type_for_mode) (word_mode, 1))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6a65a68..e4b79a9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -158,7 +158,7 @@
 	PR tree-optimization/79159
 	* g++.dg/tree-ssa/pr79159.C: New test.
 
-2017-01-24  Pekka Jääskeläinen <pekka@parmance.com>
+2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
 	    Martin Jambor  <mjambor@suse.cz>
 
 	* lib/brig-dg.exp: New file.
diff --git a/include/ChangeLog b/include/ChangeLog
index 4c1879b..54cccc0 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,4 +1,4 @@
-2017-01-24  Pekka Jääskeläinen <pekka@parmance.com>
+2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
 	    Martin Jambor  <mjambor@suse.cz>
 
 	* hsa.h: Moved here from libgomp/plugin/hsa.h.
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index be6a13a..f1cf7ed 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,4 +1,4 @@
-2017-01-24  Pekka Jääskeläinen <pekka@parmance.com>
+2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
 	    Martin Jambor  <mjambor@suse.cz>
 
 	* plugin/hsa.h: Moved to top level include.
diff --git a/libhsail-rt/ChangeLog b/libhsail-rt/ChangeLog
index b986286..30bc404 100644
--- a/libhsail-rt/ChangeLog
+++ b/libhsail-rt/ChangeLog
@@ -1,3 +1,12 @@
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* configure.tgt: Moved the white list of supported targets here
+	from configure.ac.
+
+2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+	* README: Added a proper description of what libhsail-rt is.
+
 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
 
 	Update copyright years.
diff --git a/libhsail-rt/README b/libhsail-rt/README
index 2792253..64c2107 100644
--- a/libhsail-rt/README
+++ b/libhsail-rt/README
@@ -1,4 +1,10 @@
-Run autoconf2.64 && automake-1.11  to regenerate the buildfiles.
-You might need to manually tweak the minor automake version number
-in configure.ac and aclocal.m4 (search for 1.11.6) in case your
-local 1.11 minor version doesn't match. 
\ No newline at end of file
+This library implements the agent-side runtime functionality required
+to run HSA finalized programs produced by the BRIG frontend.
+
+The library contains both the code required to run kernels on the agent
+and also functions implementing more complex HSAIL instructions.
+
+rt/workitems.c contains the runtime entry function that manages multiple
+work-item execution using fibers or simple for-loops (in case of work groups
+without barriers).  Otherwise, the rest of the source files mostly contain
+functions that typically map directly to HSAIL instructions.
diff --git a/libhsail-rt/configure.tgt b/libhsail-rt/configure.tgt
new file mode 100644
index 0000000..7c481ca
--- /dev/null
+++ b/libhsail-rt/configure.tgt
@@ -0,0 +1,38 @@
+# -*- shell-script -*-
+#  Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#  Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
+#  for General Processor Tech.
+#
+#  This file is part of the libhsail-rt.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files
+#  (the "Software"), to deal in the Software without restriction, including
+#  without limitation the rights to use, copy, modify, merge, publish,
+#  distribute, sublicense, and/or sell copies of the Software, and to
+#  permit persons to whom the Software is furnished to do so, subject to
+#  the following conditions:
+#
+#  The above copyright notice and this permission notice shall be included
+#  in all copies or substantial portions of the Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+#  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+#  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+#  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+#  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+#  USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# Disable the BRIG frontend and libhsail-rt on untested or known
+# broken systems. Currently it has been tested only on x86_64 Linux
+# of the upstream gcc targets. More targets shall be added after testing.
+case "${target}" in
+  i[[3456789]]86-*linux*)
+    ;;
+  x86_64-*-linux*)
+    ;;
+    *)
+    UNSUPPORTED=1
+    ;;
+esac

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-27  8:52                                       ` Pekka Jääskeläinen
@ 2017-01-27 14:44                                         ` Martin Jambor
  0 siblings, 0 replies; 31+ messages in thread
From: Martin Jambor @ 2017-01-27 14:44 UTC (permalink / raw)
  To: GCC Patches

Hi,

I have just committed the patch, as it is, except that a couple of
two-spaces-after Pekka's name in Changelogs had already been corrected
(sorry for that mistake) and I have also

On Fri, Jan 27, 2017 at 10:31:34AM +0200, Pekka Jääskeläinen wrote:
> --- a/gcc/brig/ChangeLog
> +++ b/gcc/brig/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-01-26  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
> +
> +	Removed stale target-libbrig reference from config-lang.in
> +
>  2017-01-26  Jakub Jelinek  <jakub@redhat.com>
>  
>  	Update copyright years.

Converted this into a standard ChangeLog entry.

Thanks,

Martin

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-01-24 20:34                         ` David Malcolm
  2017-01-24 20:43                           ` David Malcolm
@ 2017-09-17 12:13                           ` Thomas Schwinge
  2017-09-26 12:55                             ` Martin Jambor
  1 sibling, 1 reply; 31+ messages in thread
From: Thomas Schwinge @ 2017-09-17 12:13 UTC (permalink / raw)
  To: Pekka Jääskeläinen, Martin Jambor, GCC Patches
  Cc: David Malcolm

Hi!

On Tue, 24 Jan 2017 15:30:34 -0500, David Malcolm <dmalcolm@redhat.com> wrote:
> On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> > [...] I have just
> > committed the BRIG FE as revision 244867.

In a build with that enabled, I just happened to "make html" in "gcc/",
and ran into:

    [...]
    makeinfo --split-size=5000000 --html -I [...]/source-gcc/gcc/doc -I [...]/source-gcc/gcc/doc/include \
            -I [...]/source-gcc/gcc/brig -o [...]/build-gcc/gcc/HTML/gcc-8.0.0/brig
    makeinfo: missing file argument.
    Try `makeinfo --help' for more information.
    [...]/source-gcc/gcc/brig/Make-lang.in:117: recipe for target '[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html' failed
    make: *** [[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html] Error 255

> A deps issue for the docs I noticed when glancing through the commit:
> 
> diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
> new file mode 100644 (file)
> index 0000000..b85b1b0
> --- /dev/null
> +++ b/gcc/brig/Make-lang.in
> 
> [...snip...]
> 
> +# Documentation.
> +
> +GO_TEXI_FILES = \
> +       brig/gccbrig.texi \
> +       $(gcc_docdir)/include/fdl.texi \
> +       $(gcc_docdir)/include/gpl_v3.texi \
> +       $(gcc_docdir)/include/gcc-common.texi \
> +       gcc-vers.texi
> 
> Presumably this should be BRIG_TEXI_FILES, rather than GO_TEXI_FILES?
> 
> +# doc/gccbrig.info: $(BRIG_TEXI_FILES)
> +#      if test "x$(BUILD_INFO)" = xinfo; then \
> +#        rm -f doc/gccbrig.info*; \
> +#        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
> +#              -I $(gcc_docdir)/include -o $@ $<; \
> +#      else true; fi
> +
> +# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
> +#      $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
> +
> +# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
> +#      $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
> +
> +$(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
> +       $(mkinstalldirs) $(@D)
> +       rm -f $(@D)/*
> +       $(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
> +               -I $(srcdir)/brig -o $(@D) $<
> 
> ...for use in describing the deps of the above.

..., so that still needs to be fixed.  Alas, that won't help: the
"gccbrig.texi" file doesn't actually exist.  ;-)

As the intention surely must be to provide some kind of documentation
eventually, and to let me move forward, I "fixed" that (dummy file), and
also enabled some other documentation bits.  As obvious, committed to
trunk in r252893:

commit 61cfebc8aabe6bd1c2b045982943f5758ed81b8b
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sun Sep 17 12:11:40 2017 +0000

    Fix gccbrig documentation build
    
            gcc/brig/
            * Make-lang.in (GO_TEXI_FILES): Rename to...
            (BRIG_TEXI_FILES): ... this.
            (doc/gccbrig.info, doc/gccbrig.dvi, doc/gccbrig.pdf, brig.info)
            (brig.srcinfo, brig.man, brig.srcman, brig.install-man)
            ($(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)):
            Uncomment/enable targets.
            (gccbrig.pod): New target.
            * gccbrig.texi: New file.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252893 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/brig/ChangeLog    | 11 +++++++++++
 gcc/brig/Make-lang.in | 52 +++++++++++++++++++++++++++------------------------
 gcc/brig/gccbrig.texi |  5 +++++
 3 files changed, 44 insertions(+), 24 deletions(-)

diff --git gcc/brig/ChangeLog gcc/brig/ChangeLog
index 0804532..ebf31c4 100644
--- gcc/brig/ChangeLog
+++ gcc/brig/ChangeLog
@@ -1,3 +1,14 @@
+2017-09-17  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* Make-lang.in (GO_TEXI_FILES): Rename to...
+	(BRIG_TEXI_FILES): ... this.
+	(doc/gccbrig.info, doc/gccbrig.dvi, doc/gccbrig.pdf, brig.info)
+	(brig.srcinfo, brig.man, brig.srcman, brig.install-man)
+	($(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)):
+	Uncomment/enable targets.
+	(gccbrig.pod): New target.
+	* gccbrig.texi: New file.
+
 2017-08-04  Henry Linjamäki  <henry.linjamaki@parmance.com>
 
 	Fix PR 81713
diff --git gcc/brig/Make-lang.in gcc/brig/Make-lang.in
index d7566bf..23ddc03 100644
--- gcc/brig/Make-lang.in
+++ gcc/brig/Make-lang.in
@@ -93,25 +93,25 @@ brig1$(exeext): $(BRIG_OBJS) attribs.o $(BACKEND) $(LIBDEPS)
 
 # Documentation.
 
-GO_TEXI_FILES = \
+BRIG_TEXI_FILES = \
 	brig/gccbrig.texi \
 	$(gcc_docdir)/include/fdl.texi \
 	$(gcc_docdir)/include/gpl_v3.texi \
 	$(gcc_docdir)/include/gcc-common.texi \
 	gcc-vers.texi
 
-# doc/gccbrig.info: $(BRIG_TEXI_FILES)
-# 	if test "x$(BUILD_INFO)" = xinfo; then \
-# 	  rm -f doc/gccbrig.info*; \
-# 	  $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
-# 		-I $(gcc_docdir)/include -o $@ $<; \
-# 	else true; fi
+doc/gccbrig.info: $(BRIG_TEXI_FILES)
+	if test "x$(BUILD_INFO)" = xinfo; then \
+	  rm -f doc/gccbrig.info*; \
+	  $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+		-I $(gcc_docdir)/include -o $@ $<; \
+	else true; fi
 
-# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
-# 	$(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
+doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
+	$(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
 
-# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
-# 	$(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
+doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
+	$(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
 
 $(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
 	$(mkinstalldirs) $(@D)
@@ -119,28 +119,32 @@ $(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
 	$(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
 		-I $(srcdir)/brig -o $(@D) $<
 
+.INTERMEDIATE: gccbrig.pod
+
+gccbrig.pod: brig/gccbrig.texi
+	-$(TEXI2POD) -D gccbrig < $< > $@
+
 # Build hooks.
 
 brig.all.cross: gccbrig-cross$(exeext)
 brig.start.encap: gccbrig$(exeext)
 brig.rest.encap:
-#brig.info: doc/gccbrig.info
-brig.info:
+brig.info: doc/gccbrig.info
 brig.dvi: doc/gccbrig.dvi
 brig.pdf: doc/gccbrig.pdf
 brig.html: $(build_htmldir)/brig/index.html
-brig.srcinfo: #doc/gccbrig.info
-#	-cp -p $^ $(srcdir)/doc
+brig.srcinfo: doc/gccbrig.info
+	-cp -p $^ $(srcdir)/doc
 
 brig.srcextra:
 brig.tags: force
 	cd $(srcdir)/brig; \
 	etags -o TAGS.sub *.c *.h; \
 	etags --include TAGS.sub --include ../TAGS.sub
-brig.man:
 
-#brig.srcman: doc/gccbrig.1
-#	-cp -p $^ $(srcdir)/doc
+brig.man: doc/gccbrig.1
+brig.srcman: doc/gccbrig.1
+	-cp -p $^ $(srcdir)/doc
 
 lang_checks += check-brig
 
@@ -193,13 +197,13 @@ brig.install-html: $(build_htmldir)/brig
 	  fi; \
 	done
 
-brig.install-man: #$(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)
+brig.install-man: $(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)
 
-#$(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext): doc/gccbrig.1 \
-#	installdirs
-#	-rm -f $@
-#	-$(INSTALL_DATA) $< $@
-#	-chmod a-x $@
+$(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext): doc/gccbrig.1 \
+	installdirs
+	-rm -f $@
+	-$(INSTALL_DATA) $< $@
+	-chmod a-x $@
 
 brig.uninstall:
 	rm -rf $(DESTDIR)$(bindir)/$(GCCBRIG_INSTALL_NAME)$(exeext)
diff --git gcc/brig/gccbrig.texi gcc/brig/gccbrig.texi
new file mode 100644
index 0000000..9636c00
--- /dev/null
+++ gcc/brig/gccbrig.texi
@@ -0,0 +1,5 @@
+\input texinfo @c -*-texinfo-*-
+@setfilename gccbrig.info
+@settitle The GNU BRIG Compiler
+
+@bye


Grüße
 Thomas


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-09-17 12:13                           ` Thomas Schwinge
@ 2017-09-26 12:55                             ` Martin Jambor
  2017-11-16 14:40                               ` Pekka Jääskeläinen
  0 siblings, 1 reply; 31+ messages in thread
From: Martin Jambor @ 2017-09-26 12:55 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: Pekka Jääskeläinen, GCC Patches, David Malcolm

Hi,

On Sun, Sep 17, 2017 at 02:13:34PM +0200, Thomas Schwinge wrote:
> Hi!
> 
> On Tue, 24 Jan 2017 15:30:34 -0500, David Malcolm <dmalcolm@redhat.com> wrote:
> > On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> > > [...] I have just
> > > committed the BRIG FE as revision 244867.
> 
> In a build with that enabled, I just happened to "make html" in "gcc/",
> and ran into:
> 
>     [...]
>     makeinfo --split-size=5000000 --html -I [...]/source-gcc/gcc/doc -I [...]/source-gcc/gcc/doc/include \
>             -I [...]/source-gcc/gcc/brig -o [...]/build-gcc/gcc/HTML/gcc-8.0.0/brig
>     makeinfo: missing file argument.
>     Try `makeinfo --help' for more information.
>     [...]/source-gcc/gcc/brig/Make-lang.in:117: recipe for target '[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html' failed
>     make: *** [[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html] Error 255
> 
> > A deps issue for the docs I noticed when glancing through the commit:
> > 
> > diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
> > new file mode 100644 (file)
> > index 0000000..b85b1b0
> > --- /dev/null
> > +++ b/gcc/brig/Make-lang.in
> > 
> > [...snip...]
> > 
> > +# Documentation.
> > +
> > +GO_TEXI_FILES = \
> > +       brig/gccbrig.texi \
> > +       $(gcc_docdir)/include/fdl.texi \
> > +       $(gcc_docdir)/include/gpl_v3.texi \
> > +       $(gcc_docdir)/include/gcc-common.texi \
> > +       gcc-vers.texi
> > 
> > Presumably this should be BRIG_TEXI_FILES, rather than GO_TEXI_FILES?
> > 
> > +# doc/gccbrig.info: $(BRIG_TEXI_FILES)
> > +#      if test "x$(BUILD_INFO)" = xinfo; then \
> > +#        rm -f doc/gccbrig.info*; \
> > +#        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
> > +#              -I $(gcc_docdir)/include -o $@ $<; \
> > +#      else true; fi
> > +
> > +# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
> > +#      $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
> > +
> > +# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
> > +#      $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
> > +
> > +$(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
> > +       $(mkinstalldirs) $(@D)
> > +       rm -f $(@D)/*
> > +       $(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
> > +               -I $(srcdir)/brig -o $(@D) $<
> > 
> > ...for use in describing the deps of the above.
> 
> ..., so that still needs to be fixed.  Alas, that won't help: the
> "gccbrig.texi" file doesn't actually exist.  ;-)
> 

I see, I always only check "make info" when verifying documentation
changes and so missed this.  Thanks for providing the interim fix, me
and/or Pekka will add some basic content by the time next gcc 7 is
released (IIRC, it is supposed to come out at the end of this or the
beginning of next year).

Martin

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH] BRIG frontend: request for a global review
  2017-09-26 12:55                             ` Martin Jambor
@ 2017-11-16 14:40                               ` Pekka Jääskeläinen
  0 siblings, 0 replies; 31+ messages in thread
From: Pekka Jääskeläinen @ 2017-11-16 14:40 UTC (permalink / raw)
  To: Thomas Schwinge, Pekka Jääskeläinen, GCC Patches

Hi,

I added some content to gccbrig.texi in r254820 as below. If you have something
that I could describe further there, please just let me know.

Index: gcc/brig/gccbrig.texi
===================================================================
--- gcc/brig/gccbrig.texi (revision 254819)
+++ gcc/brig/gccbrig.texi (revision 254820)
@@ -1,5 +1,153 @@
 \input texinfo @c -*-texinfo-*-
 @setfilename gccbrig.info
-@settitle The GNU BRIG Compiler
+@settitle The GNU BRIG (HSAIL) Compiler
+@set copyrights-brig 2017

+@c Merge the standard indexes into a single one.
+@syncodeindex fn cp
+@syncodeindex vr cp
+@syncodeindex ky cp
+@syncodeindex pg cp
+@syncodeindex tp cp
+
+@include gcc-common.texi
+
+@copying
+@c man begin COPYRIGHT
+Copyright @copyright{} @value{copyrights-brig} Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, the Front-Cover Texts being (a) (see below), and
+with the Back-Cover Texts being (b) (see below).
+A copy of the license is included in the
+@c man end
+section entitled ``GNU Free Documentation License''.
+@ignore
+@c man begin COPYRIGHT
+man page gfdl(7).
+@c man end
+@end ignore
+
+@c man begin COPYRIGHT
+
+(a) The FSF's Front-Cover Text is:
+
+     A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+     You have freedom to copy and modify this GNU Manual, like GNU
+     software.  Copies published by the Free Software Foundation raise
+     funds for GNU development.
+@c man end
+@end copying
+
+@ifinfo
+@format
+@dircategory Software development
+@direntry
+* Gccbrig: (gccbrig).           A GCC-based compiler for BRIG/HSAIL
finalization
+@end direntry
+@end format
+
+@insertcopying
+@end ifinfo
+
+@titlepage
+@title The GNU BRIG (HSAIL) Compiler
+@versionsubtitle
+@author Pekka Jääskeläinen
+
+@page
+@vskip 0pt plus 1filll
+Published by the Free Software Foundation @*
+51 Franklin Street, Fifth Floor@*
+Boston, MA 02110-1301, USA@*
+@sp 1
+@insertcopying
+@end titlepage
+@contents
+@page
+
+@node Top
+@top Introduction
+
+This manual describes how to use @command{gccbrig}, the GNU compiler for
+the binary representation (BRIG) of the HSA Intermediate Language (HSAIL).
+For more information about the Heterogeneous System Architecture (HSA)
+Foundation's standards in general, see @uref{http://www.hsafoundation.com/}.
+
+@menu
+* Copying::                     The GNU General Public License.
+* GNU Free Documentation License::
+                                How you can share and copy this manual.
+* Using Gccbrig::               How to use Gccbrig.
+* Index::                       Index.
+@end menu
+
+@include gpl_v3.texi
+
+@include fdl.texi
+
+
+@node Using Gccbrig
+@chapter Using Gccbrig
+
+@c man title gccbrig A GCC-based compiler for HSAIL
+
+@ignore
+@c man begin SYNOPSIS gccbrig
+gccbrig [@option{-c}|@option{-S}]
+        [@option{-O}@var{level}] [@option{-L}@var{dir}@dots{}]
+        [@option{-o} @var{outfile}] @var{infile}@dots{}
+
+Gccbrig is typically not invoked from the command line, but
+through an HSA finalizer implementation.
+@c man end
+@c man begin SEEALSO
+The Info entry for @file{gccbrig} and
+@uref{https://github.com/HSAFoundation/phsa}
+@c man end
+@end ignore
+
+@c man begin DESCRIPTION gccbrig
+
+The BRIG frontend (@command{gccbrig}) differs from the
+other frontends in GCC on how it's typically used.  It's a translator
+for an intermediate language that is not meant to be written directly
+by programmers.  Its input format BRIG is a binary representation of
+HSAIL, which is a textual assembly format for an imaginary machine
+of which instruction set is defined in HSA Programmer Reference Manual
+(PRM) Specification.  Gccbrig currently implements the Base profile
+of the PRM version 1.0.
+
+HSA Runtime Specification defines an API which includes means
+to build and launch ``kernels'' from a host program running on a CPU
+to one or more heterogeneous ``kernel agents''. A kernel Agent
+is typically a GPU or a DSP device controlled by the CPU.
+The build phase is called ``finalization'', which means translation of
+one or more target-independent BRIG files describing the program that
+one wants to run in the Agent to the Agent's instruction set.  Gccbrig
+implements the translation process by generating GENERIC, which is
+translated to the ISA of any supported GCC target by the GCC's backend
+framework, thus enabling potentially any GCC target to act as an HSA agent.
+
+As the kernel finalization process can be only launched from the host API,
+@command{gccbrig} is not typically used directly from the command line by
+the end user, but through an HSA runtime implementation that implements
+the finalizer API running on the host CPU.  Gccbrig is
+designed to work with an open source HSA runtime implementation
+called ``phsa-runtime'', which can be installed from
+@uref{https://github.com/HSAFoundation/phsa-runtime}.  Phsa-runtime
+has an example Agent driver that allows any GCC-supported CPU to act as
+a kernel Agent.  The web page has further installation instructions for
+setting up it to work with a gccbrig binary installed with the GCC.
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+
 @bye

On Tue, Sep 26, 2017 at 2:55 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
> On Sun, Sep 17, 2017 at 02:13:34PM +0200, Thomas Schwinge wrote:
>> Hi!
>>
>> On Tue, 24 Jan 2017 15:30:34 -0500, David Malcolm <dmalcolm@redhat.com> wrote:
>> > On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
>> > > [...] I have just
>> > > committed the BRIG FE as revision 244867.
>>
>> In a build with that enabled, I just happened to "make html" in "gcc/",
>> and ran into:
>>
>>     [...]
>>     makeinfo --split-size=5000000 --html -I [...]/source-gcc/gcc/doc -I [...]/source-gcc/gcc/doc/include \
>>             -I [...]/source-gcc/gcc/brig -o [...]/build-gcc/gcc/HTML/gcc-8.0.0/brig
>>     makeinfo: missing file argument.
>>     Try `makeinfo --help' for more information.
>>     [...]/source-gcc/gcc/brig/Make-lang.in:117: recipe for target '[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html' failed
>>     make: *** [[...]/build-gcc/gcc/HTML/gcc-8.0.0/brig/index.html] Error 255
>>
>> > A deps issue for the docs I noticed when glancing through the commit:
>> >
>> > diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
>> > new file mode 100644 (file)
>> > index 0000000..b85b1b0
>> > --- /dev/null
>> > +++ b/gcc/brig/Make-lang.in
>> >
>> > [...snip...]
>> >
>> > +# Documentation.
>> > +
>> > +GO_TEXI_FILES = \
>> > +       brig/gccbrig.texi \
>> > +       $(gcc_docdir)/include/fdl.texi \
>> > +       $(gcc_docdir)/include/gpl_v3.texi \
>> > +       $(gcc_docdir)/include/gcc-common.texi \
>> > +       gcc-vers.texi
>> >
>> > Presumably this should be BRIG_TEXI_FILES, rather than GO_TEXI_FILES?
>> >
>> > +# doc/gccbrig.info: $(BRIG_TEXI_FILES)
>> > +#      if test "x$(BUILD_INFO)" = xinfo; then \
>> > +#        rm -f doc/gccbrig.info*; \
>> > +#        $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
>> > +#              -I $(gcc_docdir)/include -o $@ $<; \
>> > +#      else true; fi
>> > +
>> > +# doc/gccbrig.dvi: $(BRIG_TEXI_FILES)
>> > +#      $(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
>> > +
>> > +# doc/gccbrig.pdf: $(BRIG_TEXI_FILES)
>> > +#      $(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
>> > +
>> > +$(build_htmldir)/brig/index.html: $(BRIG_TEXI_FILES)
>> > +       $(mkinstalldirs) $(@D)
>> > +       rm -f $(@D)/*
>> > +       $(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
>> > +               -I $(srcdir)/brig -o $(@D) $<
>> >
>> > ...for use in describing the deps of the above.
>>
>> ..., so that still needs to be fixed.  Alas, that won't help: the
>> "gccbrig.texi" file doesn't actually exist.  ;-)
>>
>
> I see, I always only check "make info" when verifying documentation
> changes and so missed this.  Thanks for providing the interim fix, me
> and/or Pekka will add some basic content by the time next gcc 7 is
> released (IIRC, it is supposed to come out at the end of this or the
> beginning of next year).
>
> Martin

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-11-16 14:04 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 17:24 [PATCH] BRIG frontend: request for a global review Pekka Jääskeläinen
2017-01-12 14:55 ` Pekka Jääskeläinen
     [not found]   ` <CAFiYyc1z7aOxvjBG_b-Z7SQ5-XgM7dLh51M9AeARBFM7CeCd=w@mail.gmail.com>
2017-01-13 15:44     ` Pekka Jääskeläinen
2017-01-13 21:38       ` Richard Biener
2017-01-14 13:21       ` Pekka Jääskeläinen
     [not found]   ` <CAFiYyc10E20yQiTORts82HdbB1FyuwKbLvqwnKnSZuTOXe8r1Q@mail.gmail.com>
2017-01-13 15:54     ` Pekka Jääskeläinen
2017-01-16  8:46       ` Richard Biener
2017-01-16  9:07         ` Jakub Jelinek
2017-01-16  9:42           ` Pekka Jääskeläinen
2017-01-19 17:50           ` Pekka Jääskeläinen
2017-01-20  8:29             ` Richard Biener
2017-01-20 17:45               ` Pekka Jääskeläinen
2017-01-23 12:02                 ` Richard Biener
2017-01-23 12:04                   ` Martin Jambor
2017-01-23 13:17                     ` Richard Biener
2017-01-24 12:54                       ` Martin Jambor
2017-01-24 20:34                         ` David Malcolm
2017-01-24 20:43                           ` David Malcolm
2017-09-17 12:13                           ` Thomas Schwinge
2017-09-26 12:55                             ` Martin Jambor
2017-11-16 14:40                               ` Pekka Jääskeläinen
2017-01-25 10:10                         ` Thomas Schwinge
2017-01-25 12:36                           ` Jakub Jelinek
2017-01-25 16:09                             ` Thomas Schwinge
2017-01-26  8:29                               ` Pekka Jääskeläinen
2017-01-26  8:57                                 ` Jakub Jelinek
2017-01-26 11:35                                   ` Pekka Jääskeläinen
2017-01-26 12:05                                     ` Jakub Jelinek
2017-01-27  8:52                                       ` Pekka Jääskeläinen
2017-01-27 14:44                                         ` Martin Jambor
     [not found]   ` <CAFiYyc1HkaFGgFT0_5O2GiKKiANWv_y_36O0kWpzBmWLzmj3iw@mail.gmail.com>
     [not found]     ` <CAJk11WDJ8s1JO924ct_UtAEHZj6Sam9g3X10GCrOpZuZQcuEcA@mail.gmail.com>
     [not found]       ` <F38D8751-F0EB-4ADA-9DEE-A59EC43471F4@gmail.com>
2017-01-14  9:26         ` Pekka Jääskeläinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).