Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Uros Bizjak
> This patch updates libgo to the Go1.10beta1 release. The final Go > 1.10 release is expected around February 1, so it's not clear how the > release timing is going to work with GCC 8. In any case this updates > GCC to something pretty close to the final Go 1.10 release. This patch introduces a

Re: [PATCH] i386: Also adjust stack frame for stack slot alignment

2018-01-09 Thread Uros Bizjak
On Tue, Jan 9, 2018 at 10:29 PM, H.J. Lu wrote: > We should also adjust stack_realign_offset for the largest alignment of > stack slot actually used when stack realignment isn't needed. This is > required to keep stack frame properly aligned to satisfy the largest > alignment of stack slots. > >

Re: [PATCH] PR Fortran/83093 -- Check the type of character length

2018-01-09 Thread Janne Blomqvist
On Wed, Jan 10, 2018 at 3:18 AM, Steve Kargl wrote: > When parsing code and implicit typing is used, the > type of an entity used as a character length is not > known until after resolution. The attach patch > checks the type of length and response accordingly. > Regression tested on x86_64-*-fre

libgo patch committed: Work around escaping closure in runtime/export_test.go

2018-01-09 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang works around some escaping code in runtime/export_test.go. When compiling the runtime, local variables and closures may not be heap allocated. In one test, there is a go statement with a closure. In the gc compiler, it distinguishes capturing variable by value vs

libgo patch committed: Add some noescape cases to runtime

2018-01-09 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang adds some noescape cases to the runtime package. This is in preparation of turning on escape analysis for the runtime. - In gccgo, systemstack is implemented with mcall, which is not go:noescape. Wrap the closure in noescape so the escape analysis does not th

libgo patch committed: Add AIX support to cmd/go

2018-01-09 Thread Ian Lance Taylor
This patch by Tony Reix adds AIX support to cmd/go in libgo. For gccgo code avoid --whole-archive and -(. Use -blibpath instead of -rpath. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

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

2018-01-09 Thread Andrew Pinski
On Tue, Jan 9, 2018 at 6:54 AM, Segher Boessenkool wrote: > On Tue, Jan 09, 2018 at 12:23:42PM +, Wilco Dijkstra wrote: >> Segher Boessenkool wrote: >> > On Mon, Jan 08, 2018 at 0:25:47PM +, Wilco Dijkstra wrote: >> >> > Always pairing two registers together *also* degrades code quality. >

libgo patch committed: Add aix build tags

2018-01-09 Thread Ian Lance Taylor
This patch by Tony Reix adds some aix build tags to new libgo files. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 256412) +++ gcc/go/gofr

[PATCH] PR Fortran/83093 -- Check the type of character length

2018-01-09 Thread Steve Kargl
When parsing code and implicit typing is used, the type of an entity used as a character length is not known until after resolution. The attach patch checks the type of length and response accordingly. Regression tested on x86_64-*-freebsd. Ok to commit? 2018-01-09 Steven G. Kargl P

Re: [PATCH improve early strlen range folding (PR 83671)

2018-01-09 Thread Jeff Law
On 01/08/2018 08:05 PM, Martin Sebor wrote: > On 01/08/2018 04:28 AM, Richard Biener wrote: >> On Sat, Jan 6, 2018 at 11:04 PM, Martin Sebor wrote: >>> Bug 83671 - Fix for false positive reported by -Wstringop-overflow >>> does not work at -O1, points out that the string length range >>> optimizat

Go patch committed: Use temporary variable for stack allocation

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang uses a temporary variable for stack allocation when possible. Currently, an allocation expression that can be allocated on stack is implemented with __builtin_alloca, which turns into __morestack_allocate_stack_space, which may call the C malloc functi

Re: Mostly revert r254296

2018-01-09 Thread Jeff Law
On 01/07/2018 03:26 AM, Richard Sandiford wrote: > r254296 added support for (const ...) wrappers around vectors, > but in the end the agreement was to use a variable-length > encoding of CONST_VECTOR (and VECTOR_CST) instead. This patch > therefore reverts the bits that are no longer needed. > >

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-09 Thread Jeff Law
On 01/05/2018 12:25 PM, Sudakshina Das wrote: > Hi Jeff > > On 05/01/18 18:44, Jeff Law wrote: >> On 01/04/2018 08:35 AM, Sudakshina Das wrote: >>> Hi >>> >>> The bug reported a particular test di-longlong64-sync-1.c failing when >>> run on arm-linux-gnueabi with options -mthumb -march=armv5t -O[g

Go patch committed: Set captured var address to not escape before flood

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang sets captured variable addresses to nonescape until the flood phase. The escape analysis pass models closures by flowing captured variable address to the closure node. However, the escape state for the address expressions remained unset as ESCAPE_UNKN

Go patch committed: Stack allocate defer thunk

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang stack allocates defer thunk when possible, which is to say when the defer statement is not in a loop. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

Go patch committed: Don't heap allocate non-escaping Bound_method_expression

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang makes non-escaping Bound_method_expression not heap allocate. It stack allocates the closure when it does not escape. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [PATCH] Implementation of RANDOM_INIT from F2018

2018-01-09 Thread Damian Rouson
Hi Steve, Here are the results of compiling with the OpenCoarrays “caf” compiler wrapper, which uses -fcoarray=lib -lcaf_mpi: 1. random_init(repeatable=.true., image_distinct=.true.) gives repeatable sequences that are distinct on each image. 2. random_init(.true., .false.) gives repeatable seq

Go patch committed: Do some escape checks earlier

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang moves some checks of escape state earlier, from get_backend to Mark_address_taken. This permits us to reclaim escape analysis Nodes before kicking off the backend (although that is not done in this patch). Also it makes it easier to check variables a

Go patch committed: Support go:noescape cross package

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang adds support for the go:noescape compilation pragma across packages. https://golang.org/cl/83876 added support for the go:noescape pragma, but only for functions called from the same package. The pragma did not take effect for exported functions that a

Go patch committed: Stack allocate non-escaping constant make of slice

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang stack allocates a non-escaping make of a slice type with a constant length and capacity. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Go patch committed: Delay escaping sliced arrays

2018-01-09 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang delays escaping sliced arrays. Arrays that are sliced are set to escape in type checking, very early in compilation. The escape analysis runs later but cannot undo it. This patch changes it to not escape in the early stage. Later the escape analysis

[PATCH] i386: Add a test for PR target/78585

2018-01-09 Thread H.J. Lu
PR target/78585 has been fixed for GCC 7 by commit 7ed04d053eead43d87dff40fb4e2904219afc4d5 Author: jakub Date: Wed Nov 30 13:02:07 2016 + * config/i386/i386.c (dimode_scalar_chain::convert_op): Avoid sharing the SUBREG rtx between move and following insn. git-svn-id: svn+

Re: [PATCH] Fix PR80846, change vectorizer reduction epilogue (on x86)

2018-01-09 Thread Jeff Law
On 01/05/2018 02:01 AM, Richard Biener wrote: > On Tue, 28 Nov 2017, Richard Biener wrote: > >> >> The following adds a new target hook, targetm.vectorize.split_reduction, >> which allows the target to specify a preferred mode to perform the >> final reducion on using either vector shifts or scala

Re: [PATCH] RL78 movdi improvement

2018-01-09 Thread DJ Delorie
I saw one regression with this patch: PASS-FAIL: gcc.dg/torture/vshuf-v8qi.c -O2 execution test Could you confirm this? Note: I'm testing with your other (pre-2018 at least) patches applied at the same time (smax etc, anddi, bswaphi) so it might be an interaction, but the code looks like a m

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 18:50, Richard Earnshaw (lists) wrote: > On 09/01/18 17:36, Bernd Edlinger wrote: >> Richard Earnshaw wrote: >>  > Let me give an example, we use the generic code expansion if we >>  > encounter the builtin when generating code for Thumb on pre-ARMv7 >>  > devices.  We don't have ins

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 09/01/18 18:50 +, Jonathan Wakely wrote: On 09/01/18 15:02 +, Jonathan Wakely wrote: On 09/01/18 14:59 +, Jonathan Wakely wrote: On 04/01/18 11:22 +0100, Juraj Oršulić wrote: Hi Jonathan (and the libstdc++ list). Can we revive this? I sent the patches for improving the smart poi

[PATCH, rs6000] Change x86 intrinsic compat headers to use #error

2018-01-09 Thread Peter Bergner
The following patch changes the x86 intrinsic compat headers to use #error instead of #warning. We do this for two reasons. Firstly, we want the user to really be sure they want/need to use the x86 intrinsic compat support before doing so, because a warning is too easy to ignore. Secondly, we do

Ping*2 [PATCH][Middle-end][version 2]2nd patch of PR78809 and PR83026

2018-01-09 Thread Qing Zhao
Hi, I’d like to ping the following patch the 2nd time: https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01454.html I already addressed all the issues raised for the first version of the patch, and retested on both X86 and Aarch64, without any issue. I’d really like to make it into GCC 8. thank

Don't use permutes for single-element accesses (PR83753)

2018-01-09 Thread Richard Sandiford
After cunrolling the inner loop, the remaining loop in the testcase has a single 32-bit access and a group of 64-bit accesses. We first try to vectorise at 128 bits (VF 4), but decide not to for cost reasons. We then try with 64 bits (VF 2) instead. This means that the group of 64-bit accesses us

[PATCH] PR libstdc++/80276 fix pretty printers for array smart pointers

2018-01-09 Thread Jonathan Wakely
This fixes unique_ptr so it doesn't print as unique_ptr, and fixes a problem in the type-printers that can result in a gdb.error exception (see https://sourceware.org/PR22686). PR libstdc++/80276 * python/libstdcxx/v6/printers.py (SharedPointerPrinter) (UniquePointerPrinte

Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Ian Lance Taylor
On Tue, Jan 9, 2018 at 12:26 PM, Rainer Orth wrote: > Hi Ian, > >> This patch updates libgo to the Go1.10beta1 release. The final Go >> 1.10 release is expected around February 1, so it's not clear how the >> release timing is going to work with GCC 8. In any case this updates >> GCC to somethin

Re: [PATCH] fold strlen of constant aggregates (PR 83693)

2018-01-09 Thread Martin Sebor
I found a few problems in the previous revision: 1) It didn't handle the simple case of member arrays of const struct objects (only member arrays of const arrays of structs were handled). 2) The array_ctor_elt() function returned a narrow empty string for an uninitialized CONSTRUCTOR el

Go patch committed: Make top-level decl for address-taken non-escaping locals

2018-01-09 Thread Ian Lance Taylor
In the Go frontend, if a local variable's address is taken and passed out of its lexical scope, the GCC middle-end may reuse the stack slot for the variable, not knowing it is still live through a pointer. This patch by Cherry Zhang creates a top-level temporary variable and let the user-defined va

[PATCH] i386: Also adjust stack frame for stack slot alignment

2018-01-09 Thread H.J. Lu
We should also adjust stack_realign_offset for the largest alignment of stack slot actually used when stack realignment isn't needed. This is required to keep stack frame properly aligned to satisfy the largest alignment of stack slots. Tested on Linux/i686 and Linux/x86-64. OK for trunk? Thank

Re: [PATCH], Add optional IEEE/IBM long double multilib support

2018-01-09 Thread Joseph Myers
To answer some of my own questions about how this works (or doesn't work): There are two different types in libgcc called TFtype, one in quad-float128.h and one in libgcc2.h. The one in quad-float128.h is mapped to KFmode in the case where TFmode is IBM long double, so functions such as __mulk

[PATCH] Add some reproducers for issues found when developing the location-wrappers patch

2018-01-09 Thread David Malcolm
Whilst developing the location-wrapper patch kit, I accumulated various source files for which my work-in-progress patched-cc1plus had different behavior to an unpatched cc1plus: some of these were crashes, others were erroneous diagnostics. All of these are now fixed, but it seems appropriate to

Go patch committed: Add escape analysis debug hash

2018-01-09 Thread Ian Lance Taylor
This patch by Cherry Zhang adds a new -fgo-debug-escape-hash option to the Go frontend. This option takes a string that can be used to select specific functions on which to run escape analysis. This makes it easier to find escape analysis bugs by doing a binary search over all the functions, enab

Re: Go patch committed: Update to Go1.10beta1

2018-01-09 Thread Rainer Orth
Hi Ian, > This patch updates libgo to the Go1.10beta1 release. The final Go > 1.10 release is expected around February 1, so it's not clear how the > release timing is going to work with GCC 8. In any case this updates > GCC to something pretty close to the final Go 1.10 release. > > A few chang

[C++ Patch Ping] Two pending patches

2018-01-09 Thread Paolo Carlini
Hi, I'd like to gently point to two pending patches of mine:     The updated fix for PR 81055 ("[6/7/8 Regression] ICE with invalid initializer for array new")     https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01428.html and also     PR 78344 ("ICE on invalid c++ code (tree check: expected

[Committed] PR Fortran/83742 -- Check for NULL pointer

2018-01-09 Thread Steve Kargl
Committed as obvious after regression testing on x86_64-*-freebsd. 2018-01-09 Steven G. Kargl PR fortran/83742 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer. 2018-01-09 Steven G. Kargl PR fortran/83742 * gfortran.dg/contiguous_6.f90: New test.

Re: [C++ PATCH] Fix constexpr ICE with statement frontiers (PR c++/83734)

2018-01-09 Thread Jason Merrill
On Tue, Jan 9, 2018 at 10:41 AM, Jakub Jelinek wrote: > On Tue, Jan 09, 2018 at 10:30:31AM -0500, Jason Merrill wrote: >> On Mon, Jan 8, 2018 at 6:55 PM, Jakub Jelinek wrote: >> > The assert there assumes we never evaluate a statement list to >> > DEBUG_BEGIN_STMT, but it breaks appart when a BIN

Re: [PATCH v4 of 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2018-01-09 Thread Jason Merrill
On 01/09/2018 01:35 PM, David Malcolm wrote: On Tue, 2018-01-09 at 15:39 +0100, Jakub Jelinek wrote: On Tue, Jan 09, 2018 at 09:36:58AM -0500, Jason Merrill wrote: On 01/09/2018 06:53 AM, David Malcolm wrote: +case NON_LVALUE_EXPR: +case VIEW_CONVERT_EXPR: + { + /* Handle

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-09 Thread H.J. Lu
On Tue, Jan 9, 2018 at 10:52 AM, Jeff Law wrote: > On 01/07/2018 05:29 PM, H.J. Lu wrote: >> On Sun, Jan 7, 2018 at 3:36 PM, Jeff Law wrote: >>> On 01/07/2018 03:58 PM, H.J. Lu wrote: This set of patches for GCC 8 mitigates variant #2 of the speculative execution vulnerabilities o

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-09 Thread H.J. Lu
On Tue, Jan 9, 2018 at 10:55 AM, Jeff Law wrote: > On 01/08/2018 03:10 AM, Martin Liška wrote: >> On 01/07/2018 11:59 PM, H.J. Lu wrote: >>> +static void >>> +output_indirect_thunk_function (bool need_bnd_p, int regno) >>> +{ >>> + char name[32]; >>> + tree decl; >>> + >>> + /* Create __x86_ind

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-09 Thread Jeff Law
On 01/08/2018 03:10 AM, Martin Liška wrote: > On 01/07/2018 11:59 PM, H.J. Lu wrote: >> +static void >> +output_indirect_thunk_function (bool need_bnd_p, int regno) >> +{ >> + char name[32]; >> + tree decl; >> + >> + /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */ >> + indirect_thu

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-09 Thread Jeff Law
On 01/08/2018 03:01 AM, Martin Liška wrote: > On 01/08/2018 01:29 AM, H.J. Lu wrote: >> 1. They need to be backportable to GCC 7/6/5/4.x. > > I must admit this is very important constrain. To be honest, we're planning > to backport the patchset to GCC 4.3. Red Hat would likely be backporting a way

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-09 Thread Jeff Law
On 01/07/2018 05:29 PM, H.J. Lu wrote: > On Sun, Jan 7, 2018 at 3:36 PM, Jeff Law wrote: >> On 01/07/2018 03:58 PM, H.J. Lu wrote: >>> This set of patches for GCC 8 mitigates variant #2 of the speculative >>> execution >>> vulnerabilities on x86 processors identified by CVE-2017-5715, aka Spectre

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 09/01/18 15:02 +, Jonathan Wakely wrote: On 09/01/18 14:59 +, Jonathan Wakely wrote: On 04/01/18 11:22 +0100, Juraj Oršulić wrote: Hi Jonathan (and the libstdc++ list). Can we revive this? I sent the patches for improving the smart pointer pretty printers in March. They haven't been

Re: Add an "early rematerialisation" pass

2018-01-09 Thread Jeff Law
On 01/09/2018 08:34 AM, Richard Sandiford wrote: > Possible ping: wasn't sure whether this one needed more work or whether > it was OK to go in. I've attached the patch with the improved comment > above early_remat::emit_copy_before. > You answered all the questions I had. I should have explicit

Use poly_int tree accessors

2018-01-09 Thread Richard Sandiford
This patch generalises various places that used hwi tree accessors so that they can handle poly_ints instead. Earlier patches did this while updating interfaces; this patch just mops up some left-over pieces that weren't necessary to make things compile, but that still make sense. In many cases t

Use poly_int rtx accessors instead of hwi accessors

2018-01-09 Thread Richard Sandiford
This patch generalises various places that used hwi rtx accessors so that they can handle poly_ints instead. Earlier patches did this while updating interfaces; this patch just mops up some left-over pieces that weren't necessary to make things compile, but that still make sense. In many cases th

[PATCH v4 of 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2018-01-09 Thread David Malcolm
On Tue, 2018-01-09 at 15:39 +0100, Jakub Jelinek wrote: > On Tue, Jan 09, 2018 at 09:36:58AM -0500, Jason Merrill wrote: > > On 01/09/2018 06:53 AM, David Malcolm wrote: > > > +case NON_LVALUE_EXPR: > > > +case VIEW_CONVERT_EXPR: > > > + { > > > + /* Handle location wrappers by substituti

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.

2018-01-09 Thread Jeff Law
On 01/09/2018 07:43 AM, Martin Liška wrote: > On 09/20/2017 05:00 PM, Jeff Law wrote: >> On 09/20/2017 01:24 AM, Martin Liška wrote: >> >>> >>> Hello. >>> >>> Thank you Jeff for very verbose explanation what's happening. I'm planning >>> to do >>> follow-up of this patch that will include clusteri

RE: [PATCH 5/5][AArch64] fp16fml support

2018-01-09 Thread Michael Collison
Patch updated per Richard's comments. Ok for trunk? -Original Message- From: Richard Sandiford [mailto:richard.sandif...@linaro.org] Sent: Thursday, January 4, 2018 8:02 AM To: Michael Collison Cc: GCC Patches ; nd Subject: Re: [PATCH 5/5][AArch64] fp16fml support Hi Michael, Not a re

RE: [PATCH 1/5][AArch64] Crypto command line split

2018-01-09 Thread Michael Collison
I used a generic statement that applied to all five patches. The patch was bootstrapped and the test suite executed along with the other patches together. As you correctly point out there are no new instruction, but backward compatibility was tested as existing patterns had their pattern conditi

[PATCH, rs6000] Fix PR83399, ICE During LRA with 2-op rtl pattern for lvx instruction

2018-01-09 Thread Peter Bergner
PR83399 shows a problem where we emit an altivec load using a builtin that forces us to use a specific altivec load pattern. The generated rtl pattern has a use of sfp (frame pointer) and during LRA, we eliminate it's use to the sp (lra-eliminations.c:process_insn_for_elimination). During this pro

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 19:08, Richard Earnshaw (lists) wrote: > > But we probably don't need to. > > int x __attribute__((mode(TI))) = 0; > > $ arm-none-elf-gcc timode.c > > /tmp/ti.c:1:1: error: unable to emulate ‘TI’ > int x __attribute__((mode(TI))) = 0; > ^~~ > Yes, good, then you should proba

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Richard Earnshaw (lists)
On 09/01/18 18:00, Richard Earnshaw (lists) wrote: > On 09/01/18 17:57, Bernd Edlinger wrote: >> On 01/09/18 18:50, Richard Earnshaw (lists) wrote: >>> On 09/01/18 17:36, Bernd Edlinger wrote: Richard Earnshaw wrote:    > Let me give an example, we use the generic code expansion if we

Re: [PR/middle-end 81897] make tree-ssa-uninit.c handle longer sequences

2018-01-09 Thread Aldy Hernandez
On 01/07/2018 12:32 AM, Jeff Law wrote: On 01/06/2018 01:01 AM, Jeff Law wrote: On 01/05/2018 01:59 PM, Aldy Hernandez wrote: I went ahead and fixed up the empty block test, and the invalidation code above. Bootstrapped and regression tested on x86_64. Installing on the trunk. Thanks.

Re: [PATCH][GCC][AArch64] Enable dotproduct by default for Armv8.4-a

2018-01-09 Thread James Greenhalgh
On Tue, Jan 09, 2018 at 10:36:23AM +, Tamar Christina wrote: > Hi All, > > This patch makes the Dot Product extension mandatory on Armv8.4-A. > > Regtested on aarch64-none-elf and no regressions. OK. Thanks, James > gcc/ > 2018-01-09 Tamar Christina > > * config/aarch64/aarch64.h

Re: [PATCH 4/5][AArch64] Crypto sha512 and sha3

2018-01-09 Thread James Greenhalgh
On Wed, Jan 03, 2018 at 05:30:33PM +, Michael Collison wrote: > Hi All, > > This patch adds support for the SHA-512 and SHA-3 instructions added in > Armv8.4-a. Support for the new instructions is in the form of new ACLE > intrinsics. A new command line feature modifier, +sha3, is added to ena

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Richard Earnshaw (lists)
On 09/01/18 17:57, Bernd Edlinger wrote: > On 01/09/18 18:50, Richard Earnshaw (lists) wrote: >> On 09/01/18 17:36, Bernd Edlinger wrote: >>> Richard Earnshaw wrote: >>>   > Let me give an example, we use the generic code expansion if we >>>   > encounter the builtin when generating code for Thumb

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 18:50, Richard Earnshaw (lists) wrote: > On 09/01/18 17:36, Bernd Edlinger wrote: >> Richard Earnshaw wrote: >>  > Let me give an example, we use the generic code expansion if we >>  > encounter the builtin when generating code for Thumb on pre-ARMv7 >>  > devices.  We don't have ins

Re: [PATCH 3/5][AArch64] Crypto SM4 Support

2018-01-09 Thread James Greenhalgh
On Wed, Jan 03, 2018 at 05:25:57PM +, Michael Collison wrote: > Hi All, > > This patch adds support for the SM3/SM4 cryptographic instructions added in > Armv8.4-a. Support for the new instructions is in the form of new ACLE > intrinsics. A new command line feature modifier, +sm4, is added to

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-09 Thread Mike Crowe
On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > On 07/01/18 20:55 +, Mike Crowe wrote: > > The futex system call supports waiting for an absolute time if > > FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two > > benefits: > > > > 1. The call to gett

Re: [PATCH 2/5][AArch64] Add v8.4 architecture

2018-01-09 Thread James Greenhalgh
On Wed, Jan 03, 2018 at 05:25:17PM +, Michael Collison wrote: > Hi all, > > This patch adds support for the Arm architecture v8.4. A new command line > option, -march=armv8.4-a, is added as well as documentation. > > Bootstrapped on aarch64-none-elf. Tested with new binutils and verified all

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Richard Earnshaw (lists)
On 09/01/18 17:36, Bernd Edlinger wrote: > Richard Earnshaw wrote: >  > Let me give an example, we use the generic code expansion if we >  > encounter the builtin when generating code for Thumb on pre-ARMv7 >  > devices.  We don't have instructions in 'thumb1' to guard against >  > speculation and

Re: [PATCH 1/5][AArch64] Crypto command line split

2018-01-09 Thread James Greenhalgh
On Wed, Jan 03, 2018 at 05:21:27PM +, Michael Collison wrote: > Hi all, > > This patch adds two new command line options for the legacy cryptographic > extensions AES (+aes) and SHA-1/SHA-2 (+sha2). Backward compatibility is > retained by modifying the +crypto feature modifier to enable +aes a

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
Richard Earnshaw wrote: > Let me give an example, we use the generic code expansion if we > encounter the builtin when generating code for Thumb on pre-ARMv7 > devices. We don't have instructions in 'thumb1' to guard against > speculation and we really want to warn users that they've done this

Go patch committed: Use macro Unordered_map instead of std::unordered_map

2018-01-09 Thread Ian Lance Taylor
This patch by Cherry Zhang fixes a case in the Go frontend that was using std::unodered_map where it should use the macro Unordered_map for more portability. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: [PATCH] Implementation of RANDOM_INIT from F2018

2018-01-09 Thread Steve Kargl
On Mon, Jan 08, 2018 at 06:51:06PM -0800, Jerry DeLisle wrote: > On 01/08/2018 04:58 PM, Steve Kargl wrote: > > > > Boostrapped and regression tested on x86_64-*-freebsd. > > OK to commit? > > > > Yes, Looks good Steve. So all we need is a run test with actual =lib case. > Just realized that

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-09 Thread Bill Schmidt
On Jan 9, 2018, at 4:21 AM, Richard Earnshaw (lists) wrote: > > On 08/01/18 16:01, Bill Schmidt wrote: >> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >> wrote: >>> >>> On 08/01/18 02:20, Bill Schmidt wrote: Hi Richard, Unfortunately, I don't see any way that this will

Re: [PATCH, combine]: Use correct mode for ASHIFT in force_int_to_mode

2018-01-09 Thread Segher Boessenkool
Hi! On Mon, Jan 08, 2018 at 08:41:55PM +0100, Uros Bizjak wrote: > Attached patch corrects wrong mode argument in the call to > force_to_mode call for ASHIFT operator. The patch uses "mode" mode, > the same as for all binop and unop operators in the force_int_to_mode > function. > > Also, the unp

RFA: Expand vec_perm_indices::series_p comment

2018-01-09 Thread Richard Sandiford
James Greenhalgh writes: > On Thu, Jan 04, 2018 at 11:27:56AM +, Richard Sandiford wrote: >> Ping**2 > > This is OK. Thanks. > It took me a while to get the hang of the interface - a worked example > in the comment in vec-perm-indices.c would probably have been helpful. > It took until your

Re: [C++ PATCH] Fix constexpr ICE with statement frontiers (PR c++/83734)

2018-01-09 Thread Jakub Jelinek
On Tue, Jan 09, 2018 at 10:30:31AM -0500, Jason Merrill wrote: > On Mon, Jan 8, 2018 at 6:55 PM, Jakub Jelinek wrote: > > The assert there assumes we never evaluate a statement list to > > DEBUG_BEGIN_STMT, but it breaks appart when a BIND_EXPR with a typedef in it > > has some DEBUG_BEGIN_STMTs i

[PATCH PR81228][AARCH64][gcc-7] Backport r255625 : Fix ICE by adding LTGT

2018-01-09 Thread Sudakshina Das
Hi This patch is only adding the missing LTGT to plug the ICE. This is a backport to r255625 of trunk. Testing done: Checked for regressions on bootstrapped aarch64-none-linux-gnu and added a new compile time test case that gives out LTGT to make sure it doesn't ICE. Is this ok for trunk?

Re: Add support for in-order addition reduction using SVE FADDA

2018-01-09 Thread Richard Sandiford
Ping Richard Sandiford writes: > Richard Biener writes: >> On Mon, Nov 20, 2017 at 1:54 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: On Fri, Nov 17, 2017 at 5:53 PM, Richard Sandiford wrote: > This patch adds support for in-order floating-point addition reductions,

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 02/03/17 19:10 +0100, Juraj Oršulić wrote: On Fri, Feb 24, 2017 at 5:36 PM, Jonathan Wakely wrote: For a patch this size we do, so I'm not going to look at your patch. It will probably be simpler to just do it myself, and not worry about paperwork. If you want to contribue in future then pl

Re: Add an "early rematerialisation" pass

2018-01-09 Thread Richard Sandiford
Possible ping: wasn't sure whether this one needed more work or whether it was OK to go in. I've attached the patch with the improved comment above early_remat::emit_copy_before. Thanks, Richard Richard Sandiford writes: > Jeff Law writes: >> On 11/17/2017 08:58 AM, Richard Sandiford wrote: >>

Re: [PATCH] Simplify floating point comparisons

2018-01-09 Thread Wilco Dijkstra
Richard Biener wrote: >On Thu, Jan 4, 2018 at 10:27 PM, Marc Glisse wrote: >> I don't understand how the check you added helps. It simply blocks the transformation for infinity: + (if (!REAL_VALUE_ISINF (TREE_REAL_CST (@0))) + (switch + (if (real_less (&dconst0, TREE_REAL_CST_P

Re: [C++ PATCH] Fix constexpr ICE with statement frontiers (PR c++/83734)

2018-01-09 Thread Jason Merrill
On Mon, Jan 8, 2018 at 6:55 PM, Jakub Jelinek wrote: > The assert there assumes we never evaluate a statement list to > DEBUG_BEGIN_STMT, but it breaks appart when a BIND_EXPR with a typedef in it > has some DEBUG_BEGIN_STMTs in it and nothing else (without -g it is just > empty STATEMENT_LIST ins

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Richard Earnshaw (lists)
On 05/01/18 17:26, Jeff Law wrote: > On 01/04/2018 11:20 AM, Joseph Myers wrote: >> On Thu, 4 Jan 2018, Richard Earnshaw wrote: >> >>> 1 - generic modifications to GCC providing the builtin function for all >>> architectures and expanding to an implementation that gives the >>> logical beha

Re: Make ivopts handle calls to internal functions

2018-01-09 Thread Richard Sandiford
Richard Biener writes: > On Mon, Nov 20, 2017 at 12:31 PM, Bin.Cheng wrote: >> On Fri, Nov 17, 2017 at 3:03 PM, Richard Sandiford >> wrote: >>> ivopts previously treated pointer arguments to internal functions >>> like IFN_MASK_LOAD and IFN_MASK_STORE as normal gimple values. >>> This patch make

Re: [PATCH] Clean up partitioning in try_optimize_cfg (PR bootstrap/82831).

2018-01-09 Thread Jan Hubicka
> Hello. > > This is patch for i586 bootstrap that is triggered by bug in detail described > in the PR. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin > > gcc/ChangeLog: > > 2018-01-09 Martin Liska > > PR bootstrap/8

Re: [PATCH 3/5] Adjust predictor values according to SPEC2006 and, SPEC2017.

2018-01-09 Thread Jan Hubicka
> Third part changes predictors values: > > 1) PRED_LOOP_EXIT: no dominant branch; value simply taken from statistics > 2) PRED_LOOP_EXIT_WITH_RECURSION: there are 4 dominant edges; value taken w/o > these edges > 3) PRED_LOOP_EXTRA_EXIT: there's one really dominant edge; value taken w/o > the e

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 09/01/18 14:59 +, Jonathan Wakely wrote: On 04/01/18 11:22 +0100, Juraj Oršulić wrote: Hi Jonathan (and the libstdc++ list). Can we revive this? I sent the patches for improving the smart pointer pretty printers in March. They haven't been reviewed. Thanks for the reminder. I'm testing

Re: Smart pointer pretty printers

2018-01-09 Thread Jonathan Wakely
On 04/01/18 11:22 +0100, Juraj Oršulić wrote: Hi Jonathan (and the libstdc++ list). Can we revive this? I sent the patches for improving the smart pointer pretty printers in March. They haven't been reviewed. Thanks for the reminder. I'm testing the attached patch, which has been rebased on tru

Re: [PATCH v2.4 of 02/14] Support for adding and stripping location_t wrapper nodes

2018-01-09 Thread Jason Merrill
On 01/09/2018 06:37 AM, David Malcolm wrote: + /* We should only be adding wrappers for constants and for decls, + or for some exceptional tree nodes (e.g. BASELINK in the C++ FE). */ + gcc_assert (CONSTANT_CLASS_P (expr) + || DECL_P (expr) + || EXCEPTIONAL_CLASS_P

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

2018-01-09 Thread Segher Boessenkool
On Tue, Jan 09, 2018 at 12:23:42PM +, Wilco Dijkstra wrote: > Segher Boessenkool wrote: > > On Mon, Jan 08, 2018 at 0:25:47PM +, Wilco Dijkstra wrote: > >> > Always pairing two registers together *also* degrades code quality. > >> > >> No, while it's not optimal, it means smaller code and

[PATCH] RX movsicc degrade fix

2018-01-09 Thread Sebastian Perta
Hello, In recent versions of GCC the define_expand "movsicc" has stopped being used by GCC (approx. 4.7.x/4.8.x onwards) The reason for this is that the first operand of if_then_else has SI mode and it shouldn't have. If we take a look at movsicc for all other targets we see this is true. The fix

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.

2018-01-09 Thread Martin Liška
On 09/20/2017 05:00 PM, Jeff Law wrote: > On 09/20/2017 01:24 AM, Martin Liška wrote: > >> >> Hello. >> >> Thank you Jeff for very verbose explanation what's happening. I'm planning >> to do >> follow-up of this patch that will include clustering for bit-tests and jump >> tables. >> Maybe that w

Re: [PATCH 0/5] Make std::future::wait_* use std::chrono::steady_clock when required

2018-01-09 Thread Jonathan Wakely
On 07/01/18 20:55 +, Mike Crowe wrote: This patch series was originally submitted back in September at https://gcc.gnu.org/ml/libstdc++/2017-09/msg00083.html which ended up as https://patchwork.ozlabs.org/cover/817379/ . The patches received no comments at all, which may mean that they are pe

Re: Improve canonicalisation of TARGET_MEM_REFs

2018-01-09 Thread Richard Sandiford
Richard Biener writes: > On Tue, Nov 7, 2017 at 7:04 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Fri, Nov 3, 2017 at 5:32 PM, Richard Sandiford >>> wrote: A general TARGET_MEM_REF is: BASE + STEP * INDEX + INDEX2 + OFFSET After classifying the ad

Re: [PATCH v3 of 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2018-01-09 Thread Jakub Jelinek
On Tue, Jan 09, 2018 at 09:36:58AM -0500, Jason Merrill wrote: > On 01/09/2018 06:53 AM, David Malcolm wrote: > > +case NON_LVALUE_EXPR: > > +case VIEW_CONVERT_EXPR: > > + { > > + /* Handle location wrappers by substituting the wrapped node > > +first,*then* reusing the resul

Re: [PATCH v3 of 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2018-01-09 Thread Jason Merrill
On 01/09/2018 06:53 AM, David Malcolm wrote: +case NON_LVALUE_EXPR: +case VIEW_CONVERT_EXPR: + { + /* Handle location wrappers by substituting the wrapped node +first,*then* reusing the resulting type. Doing the type +first ensures that we handle te

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Alexander Monakov
On Tue, 9 Jan 2018, Richard Earnshaw (lists) wrote: > Read condition 1 i) again. > > > i) the conditional select instruction has a register data dependency on > a load R1, that has been executed speculatively, for one of its input > registers, and Sorry - I don't know how I missed that. I unders

Re: [PATCH 1/5] Improve libstdc++-v3 async test

2018-01-09 Thread Jonathan Wakely
On 07/01/18 20:55 +, Mike Crowe wrote: Add tests for waiting for the future using both std::chrono::steady_clock and std::chrono::system_clock in preparation for dealing with those clocks properly in futex.cc. --- libstdc++-v3/testsuite/30_threads/async/async.cc | 36

[PING 5] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-09 Thread Boris Kolpackov
Hi, Looks like this is the last chance for this patch to make GCC 8 so I would like to ping it one last time: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01451.html It has been reviewed (with thanks) by David Malcolm[1] and Martin Sebor[2]. Their concerns are addressed in the latest revision o

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-09 Thread Jonathan Wakely
On 07/01/18 20:55 +, Mike Crowe wrote: The futex system call supports waiting for an absolute time if FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two benefits: 1. The call to gettimeofday is not required in order to calculate a relative timeout. 2. If someone chang

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Richard Earnshaw (lists)
On 09/01/18 13:27, Alexander Monakov wrote: > On Tue, 9 Jan 2018, Richard Earnshaw (lists) wrote: >> > Sorry, I don't follow. On ARM, it is surprising that CSEL-CSDB-LDR sequence >> > wouldn't work (applying CSEL to the address rather than loaded value), and >> > if it wouldn't, then ARM-specific l

  1   2   >