Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-02-03 Thread Richard Sandiford
Segher Boessenkool  writes:
> On Thu, Jan 11, 2018 at 03:35:37PM +, Wilco Dijkstra wrote:
>> Segher Boessenkool wrote:
>>   
>> > Of course I see that ldp is useful.  I don't think that this particular
>> > way of forcing more pairs is a good idea.  Needs testing / benchmarking /
>> > instrumentation, and we haven't seen any of that.
>> 
>> I wouldn't propose a patch if it caused slowdowns. In fact I am seeing
>> speedups,
>> particularly benchmarks which benefit from shrinkwrapping (eg. povray). Int 
>> is
>> flat, and there is an overall gain on fp.
>> 
>> > Forcing pairs before separate shrink-wrapping reduces the effectiveness
>> > of the latter by a lot.
>> 
>> That doesn't appear to be the case - or at least any reduction in
>> effectiveness is
>> more than mitigated by the lower number of memory accesses and I-cache 
>> misses.
>> To do better still you'd need to compute an optimal set of pairs, and
>> that is quite
>> difficult in the current infrastructure. I could dynamically create
>> pairs just in the backend
>> but that won't be optimal either.
>
> Right, I certainly believe forming more pairs before sws (as you do)
> improves the code -- but I think forming the pairs only after sws will
> work even better.
>
> But yes that is more work to implement, and the benefit (if any) is
> unknown.  I hoped I could convince you to try ;-)

Where we do stand with this patch?  I think it's legitimately a
regression fix; like Wilco, I'm seeing benchmarks in which epilogue
restores are no longer paired for important functions.

Even if things could be improved elsewhere, the patch seems to make
sense on its own and is also nicely localised.

Thanks,
Richard


[Patch, fortran] [8.0 Regressions] PR84141 and PR84155

2018-02-03 Thread Paul Richard Thomas
2018-02-03  Paul Thomas  

PR fortran/84141
PR fortran/84155
* trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
use gfc_get_dtype_rank_type.

2018-02-03  Paul Thomas  

PR fortran/84141
PR fortran/84155
* gfortran.dg/pr84155.f90 : New test.

Committed as revision 257356 after an OK by Thomas on #gfortran.

Paul

-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein


Go patch committed: Mark structs to use structural equality

2018-02-03 Thread Ian Lance Taylor
The Go frontend relies on the ability to convert from one struct type
to another, which it does using VIEW_CONVERT_EXPR.  For complete type
safety doing this we need to mark struct types as using structural
equality, which we were not doing.  We mostly got away with this, but
https://golang.org/issue/23667 shows a case where that fails (many
test failures were caused by a single miscompilation in the library).
This patch changes the Go frontend to GCC interface to mark structs as
using structural equality.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu and powerpc64le-unknown-linux-gnu.  Committed to
mainline.

Ian


2018-02-03  Ian Lance Taylor  

* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
using structural equality.
Index: gcc/go/go-gcc.cc
===
--- gcc/go/go-gcc.cc(revision 257319)
+++ gcc/go/go-gcc.cc(working copy)
@@ -962,6 +962,13 @@ Gcc_backend::fill_in_struct(Btype* fill,
 }
   TYPE_FIELDS(fill_tree) = field_trees;
   layout_type(fill_tree);
+
+  // Because Go permits converting between named struct types and
+  // equivalent struct types, for which we use VIEW_CONVERT_EXPR, and
+  // because we don't try to maintain TYPE_CANONICAL for struct types,
+  // we need to tell the middle-end to use structural equality.
+  SET_TYPE_STRUCTURAL_EQUALITY(fill_tree);
+
   return fill;
 }
 


[PATCH] WebAssembly: Disable subdirectory configuration for unsupported LD

2018-02-03 Thread Maciej W. Rozycki
Remove an LD subdirectory configuration error:

*** ld does not support target wasm32-unknown-none
*** see ld/configure.tgt for supported targets
make[1]: *** [configure-ld] Error 1

which prevents binutils for the WebAssembly target from being built 
unless an explicit `--disable-ld' configuration option has been given. 
Users must not have to disable features selected by default to get a 
working configuration.

/
* configure.ac  (noconfigdirs): Add `ld'.
* configure: Regenerate.
---
Hi,

 It should be obvious.  Also this causes troubles with cross-target 
testing.  OK to apply?

  Maciej
---
 configure|3 +++
 configure.ac |3 +++
 2 files changed, 6 insertions(+)

binutils-wasm32-no-ld.diff
Index: binutils/configure
===
--- binutils.orig/configure 2018-01-28 00:48:43.0 +
+++ binutils/configure  2018-02-02 05:48:19.239569799 +
@@ -3860,6 +3860,9 @@ case "${target}" in
   vax-*-*)
 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
 ;;
+  wasm32-*-*)
+noconfigdirs="$noconfigdirs ld"
+;;
 esac
 
 # If we aren't building newlib, then don't build libgloss, since libgloss
Index: binutils/configure.ac
===
--- binutils.orig/configure.ac  2018-01-28 00:48:43.0 +
+++ binutils/configure.ac   2018-02-02 05:48:09.444938712 +
@@ -1191,6 +1191,9 @@ case "${target}" in
   vax-*-*)
 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
 ;;
+  wasm32-*-*)
+noconfigdirs="$noconfigdirs ld"
+;;
 esac
 
 # If we aren't building newlib, then don't build libgloss, since libgloss


[Arm] GCC crash in cprop_hardreg when targeting v8-A Thumb

2018-02-03 Thread Michael Collison
This patches fixes a bug affecting two patterns in arm/thumb2.md where the 
split condition was insufficient and allowed illegal rtl to be generated. The 
split condition for patterns "*thumb2_mov_negscc "and "*thumb_mov_notscc " 
allowed splitting that ignored "arm_restrict_it". This was causing illegal rtl 
to be generated for IT blocks which in turn caused an internal error.

Bootstrapped and regression tested on arm-linux-gnueabihf. Okay for trunk?


2018-01-28  Michael Collison  

* config/arm/thumb2.md:
(*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
(*thumb_mov_notscc): Ditto.
* gcc.target/arm/pr7676.c: New testcase.



gnutools-7676.patch
Description: gnutools-7676.patch


Contents of PO file 'cpplib-8.1-b20180128.ru.po'

2018-02-03 Thread Translation Project Robot


cpplib-8.1-b20180128.ru.po.gz
Description: Binary data
The Translation Project robot, in the
name of your translation coordinator.



New Russian PO file for 'cpplib' (version 8.1-b20180128)

2018-02-03 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'cpplib' has been submitted
by the Russian team of translators.  The file is available at:

http://translationproject.org/latest/cpplib/ru.po

(This file, 'cpplib-8.1-b20180128.ru.po', has just now been sent to you in
a separate email.)

All other PO files for your package are available in:

http://translationproject.org/latest/cpplib/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

http://translationproject.org/domain/cpplib.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.




[PATCH 1/2] Untangle stddef.h a little

2018-02-03 Thread Maya Rashish
Of the currently supported BSDs:
- FreeBSD, doesn't have ansi.h or define _MACHINE_ANSI_H anywhere
in its other headers since the long-gone 5.x release.
- OpenBSD, DragonflyBSD don't have ansi.h either.
- NetBSD, sole remaining with ansi.h

Replace all the ifdef macros to be ifdef __NetBSD__ as it's the
sole remaining user.

Whether it is appropriate to make per-OS choices here is debatable,
but this change allows for further future cleanup.

This enables using the headers on netbsd archs that use different
include guards for ansi.h, like ARM.

(Note that netbsd's copy of GCC avoids this header entirely.)
Built tested on NetBSD-8.99.12/amd64.
---
 gcc/ginclude/stddef.h | 20 +---
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
index 31b96a7e5..15a99e7da 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -46,9 +46,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If 
not, see
 /* This avoids lossage on SunOS but only if stdtypes.h comes first.
There's no way to win with the other order!  Sun lossage.  */
 
-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
-   one less case to deal with in the following.  */
-#if defined (__BSD_NET2__) || defined (386BSD) || (defined 
(__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+#if defined(__NetBSD__)
 #include 
 #endif
 /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
@@ -56,11 +54,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If 
not, see
 #include 
 #endif
 
-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-   defined if the corresponding type is *not* defined.
-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-   NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) 
 || defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
 #define _SIZE_T
 #endif
@@ -87,7 +81,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If 
not, see
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || 
defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */
+#endif /* defined(__NetBSD__) */
 
 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
Just ignore it.  */
@@ -359,11 +353,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef __need_wint_t
 #endif
 
-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-are already defined.  */
-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
-/*  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.  */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) 
|| defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
 are probably typos and should be removed before 2.8 is released.  */
 #ifdef _GCC_PTRDIFF_T_
@@ -391,7 +381,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */
+#endif /* __NetBSD__ */
 
 #endif /* __sys_stdtypes_h */
 
-- 
2.15.1



[PATCH 2/2] Simplify: combine cases for dfly+fbsd with vms.

2018-02-03 Thread coypu
No need to have VMS in a separate elif case and a separate comment
for it saying the same thing.

No functional change intended.
---
 gcc/ginclude/stddef.h | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
index 15a99e7da..8d5a73ab5 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -196,10 +196,9 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
 #define _SIZET_
 #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
   || defined(__DragonFly__) \
-  || defined(__FreeBSD_kernel__)
-/* __size_t is a typedef on FreeBSD 5, must not trash it. */
-#elif defined (__VMS__)
-/* __size_t is also a typedef on VMS.  */
+  || defined(__FreeBSD_kernel__) \
+  || defined(__VMS__)
+/* __size_t is a typedef, must not trash it.  */
 #else
 #define __size_t
 #endif
-- 
2.15.1