[PATCH] Fix off-by-one in simple-object-elf.c (PR lto/91228).

2019-07-23 Thread Martin Liška
Hi. The patch is about off-by-one error that I used for a wrong argument. I consider that pre-approved by Richi. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thanks, Martin libiberty/ChangeLog: 2019-07-23 Martin Liska PR lto/91228 * simple-object-e

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Martin Liška
On 7/24/19 12:32 AM, Jeff Law wrote: > On 7/23/19 8:23 AM, Martin Liška wrote: >> On 7/23/19 3:57 PM, Jeff Law wrote: >>> On 7/23/19 7:50 AM, Michael Matz wrote: Hi, On Tue, 23 Jul 2019, Jeff Law wrote: >> great you found time to make this. It should become the default for >

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Martin Liška
On 7/24/19 12:11 AM, Allan Sandfeld Jensen wrote: > On Dienstag, 23. Juli 2019 10:30:07 CEST Martin Liška wrote: >> Hi. >> >> As we as openSUSE started using -flto, I see it very handy to have >> an option value that will automatically detect number of cores >> that can be used for parallel LTRANS

Re: [Darwin, committed] Fix PR87030 and tidy config fragments.

2019-07-23 Thread Iain Sandoe
> On 23 Jul 2019, at 21:31, Iain Sandoe wrote: > > This is about 32/64b host and multilib support across the range of Darwin > systems. > > Prior to Darwin8 (OS X 10.4), the toolchains support only PowerPC and only > 32b. > > On Darwin8 it is possible to target a 64b multilib, but with suppo

[Committed] PR fortran/54072 -- More fun with BOZ

2019-07-23 Thread Steve Kargl
I've committed the attached patch as a follow-up to the recent BOZ (r273747). It removes a few leftover comments as well as fixes the PR. 2019-07-23 Steven G. Kargl PR fortran/54072 * check.c (gfc_invalid_boz): Fix comment. (illegal_boz_arg): New function. (gfc_check_transfer): Use to arg

Re: [range-ops] patch 01/04: types for VR_UNDEFINED and VR_VARYING

2019-07-23 Thread Andrew MacLeod
On 7/23/19 5:33 AM, Richard Biener wrote: What irange contains internally is a bit arbitrary. It's really an API for managing a set of subranges. We could have used trees internally just as easily, then we wouldnt need a type field. Since we were doing lots of operations, rather than going ba

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Jeff Law
On 7/23/19 8:23 AM, Martin Liška wrote: > On 7/23/19 3:57 PM, Jeff Law wrote: >> On 7/23/19 7:50 AM, Michael Matz wrote: >>> Hi, >>> >>> On Tue, 23 Jul 2019, Jeff Law wrote: >>> > great you found time to make this. It should become the default for > -flto IMO. I was going to hack it in

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Allan Sandfeld Jensen
On Dienstag, 23. Juli 2019 10:30:07 CEST Martin Liška wrote: > Hi. > > As we as openSUSE started using -flto, I see it very handy to have > an option value that will automatically detect number of cores > that can be used for parallel LTRANS phase. > > Thoughts? > That's really nice. How much

[PATCH] i386: Separate costs of pseudo registers from hard registers

2019-07-23 Thread H.J. Lu
On Mon, Jun 24, 2019 at 9:16 AM H.J. Lu wrote: > > On Mon, Jun 24, 2019 at 6:37 AM Richard Biener wrote: > > > > On Thu, 20 Jun 2019, Jan Hubicka wrote: > > > > > > > Currently, costs of moves are also used for costs of RTL expressions. > > > > > This > > > > > patch: > > > > > > > > > > https

Re: [PATCH,fortran] Handle BOZ in accordance to Fortran 2018 standard (1st batch)

2019-07-23 Thread Steve Kargl
On Mon, Jul 22, 2019 at 02:33:08PM +0200, Dominique d'Humières wrote: > (A) I see the following failures > > FAIL: libgomp.fortran/reduction4.f90 -O0 (test for excess errors) > … > FAIL: libgomp.fortran/reduction5.f90 -Os (test for excess errors) > I added a fix for this to the megapatch.

Re: [PATCH,fortran] Handle BOZ in accordance to Fortran 2018 standard

2019-07-23 Thread Steve Kargl
On Sat, Jul 20, 2019 at 10:12:07AM -0700, Jerry DeLisle wrote: > On 7/17/19 8:32 PM, Steve Kargl wrote: > > I will be away until Monday. Plenty of time for a review. > > > > > > ---snip -- > > Something not quite right here in this comment. > > > +/* A BOZ literal constant can appear in a li

[Darwin, committed] Fix PR87030 and tidy config fragments.

2019-07-23 Thread Iain Sandoe
This is about 32/64b host and multilib support across the range of Darwin systems. Prior to Darwin8 (OS X 10.4), the toolchains support only PowerPC and only 32b. On Darwin8 it is possible to target a 64b multilib, but with support limited to a few of the main libraries on the system (not a recom

Re: [PATCH v3 0/5] OpenRISC updates for 10 (fpu, fixes)

2019-07-23 Thread Stafford Horne
Hi All, This is all upstream now. Thank you for the reviews. On Tue, Jul 09, 2019 at 10:06:21PM +0900, Stafford Horne wrote: > Hello, > > New since v2: > - Fix comment formatting pointed out by Segher in valatile patch > - Fix issue and add test for rotrsi3 options pointed out by Segher > -

[committed] Add PR markers and test for pr86061

2019-07-23 Thread Jeff Law
I was wandering through the DSE BZs. pr86061 is something I just recently fixed. I've added markers to the relevant ChangeLog entries and added the test from the BZ to the testsuite as well. jeff diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d405921425f..c6c0f4a70af 100644 --- a/gcc/ChangeLo

[PATCH] Fix typo LIBGCCJIT_SYMLINK -> LIBGCCJIT_SONAME_SYMLINK

2019-07-23 Thread Arvind Sankar
There seems to be a typo in gcc/jit/Make-lang.in where it references an undefined LIBGCCJIT_SYMLINK instead of LIBGCCJIT_SONAME_SYMLINK. --- gcc/jit/Make-lang.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in index 660f54d78bd..

Merge from trunk to gccgo branch

2019-07-23 Thread Ian Lance Taylor
I merged trunk revision 273743 to the gccgo branch. Ian

Go patch committed: Use correct value in 2-case select send

2019-07-23 Thread Ian Lance Taylor
This Go frontend patch by Cherry Zhang fixes the 2-case select send. In the channel-send case, the value to be sent may needs an (implicit) type conversion to the channel element type. This patch ensures that we use the correct value type for the send. This fixes https://golang.org/issue/33235.

[PATCH 3/4] New IPA-SRA implementation

2019-07-23 Thread Martin Jambor
This patch actually adds the analysis bits of IPA-SRA - both the function summary generation and the interprocedural analysis and decision stage. The transformation itself then happens in the call graph cloning infrastructure changes which are in the previous patch. Please see the cover letter of

[PATCH 1/4] Remove old IPA-SRA, introduce tree-sra.h

2019-07-23 Thread Martin Jambor
This patch removes the old IPA-SRA. Please see the covert letter for more information about the whole patch-set. Martin 2019-07-23 Martin Jambor * dbgcnt.def: Remove eipa_sra. * passes.def: Remove old IPA-SRA. * tree-pass.h (make_pass_early_ipa_sra): Remove declaratio

[PATCH 4/4] Modifications to the testsuite

2019-07-23 Thread Martin Jambor
This are all modifications to the testsuite required to get to the state described in the cover letter of the entire IPA-SRA patch-series. Please note that ipa/ipa-sra-2.c and ipa/ipa-sra-6.c should actually be svn rm-ed instead as they try to invoke functionality that the new IPA-SRA does not hav

[PATCH 0/4] True IPA reimplementation of IPA-SRA (v3)

2019-07-23 Thread Martin Jambor
Hello, I have been working a bit more on the IPA-SRA reimplementation that I have previously posted here in: https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00472.html This reimplementation is a full IPA pass that can handle strictly connected components in the call-graph, can take advantage o

Re: [PATCH] MIPS: Fix GCC `noreorder' for undefined R5900 short loops

2019-07-23 Thread Fredrik Noring
Hi Maciej, > > How can one reasonably prevent the bug when compiling a whole Linux > > distribution with thousands of packages if GAS merely warns and proceeds > > in many cases? > > I think the tools must not set a policy. By using `.set noreorder' the > user told the toolchain he knows bette

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-23 Thread Arvind Sankar
On Tue, Jul 23, 2019 at 10:31:16AM -0600, Martin Sebor wrote: > On 7/23/19 10:11 AM, Arvind Sankar wrote: > > Hi, SVN rev 273311 appears to have been committed without regenerating > > gcc/config*? > > That commit wasn't meant to change the configure script since > the warning implementation isn't

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-23 Thread Martin Sebor
On 7/23/19 10:11 AM, Arvind Sankar wrote: Hi, SVN rev 273311 appears to have been committed without regenerating gcc/config*? That commit wasn't meant to change the configure script since the warning implementation isn't part of the patch. Let me back it out. Martin

Re: [PATCH] PR91195: fix -Wmaybe-uninitialized warning for conditional store optimization

2019-07-23 Thread Martin Sebor
On 7/22/19 10:26 PM, JiangNing OS wrote: This patch is to fix PR91195. Is it OK for trunk? diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 711a31ea597..4db36644160 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-22 Jiangning Liu + + PR middle-end/91195 + *

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-23 Thread Arvind Sankar
Hi, SVN rev 273311 appears to have been committed without regenerating gcc/config*? Thanks.

Re: [ARM][PATCH 2/2] Remove redundant constructs added for FP16 support.

2019-07-23 Thread Srinath Parvathaneni
Hi, Pinging for review of https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01922.html Regards, SRI. From: Srinath Parvathaneni Sent: 29 May 2019 15:48 To: gcc-patches@gcc.gnu.org

Re: [ARM][PATCH 1/2] Support HFmode for standard names implemented with VRINT instructions.

2019-07-23 Thread Srinath Parvathaneni
Hi, Pinging for review of https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01921.html. Regards, SRI. From: gcc-patches-ow...@gcc.gnu.org on behalf of Srinath Parvathaneni

Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning

2019-07-23 Thread Matthew Beliveau
ping On Tue, Jul 16, 2019 at 8:40 AM Marek Polacek wrote: > > On Mon, Jul 15, 2019 at 09:47:26AM -0400, Matthew Beliveau wrote: > > Okay I kept the TYPE_MAIN_VARIANT and dropped the accidental new line! > > Hopefully this should be fine! > > CCing Joseph as this is c-family/ stuff. > > > Bootstra

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Martin Liška
On 7/23/19 3:57 PM, Jeff Law wrote: > On 7/23/19 7:50 AM, Michael Matz wrote: >> Hi, >> >> On Tue, 23 Jul 2019, Jeff Law wrote: >> great you found time to make this. It should become the default for -flto IMO. >>> I was going to hack it into the rpm configury bits since we have access >>>

[committed] Re: [PATCH] make gdbhooks.py idempotent with respect to reloading

2019-07-23 Thread Vladislav Ivanishin
Vladislav Ivanishin writes: > Vladislav Ivanishin writes: > >> Hi! >> >> It is nice to be able to reload the pretty printers and convenience >> functions from gdbhooks.py without exiting GDB: reloading cc1 takes >> several seconds (plus, the debugging session is lost). >> >> Previously: >> >>

[PR rtl-optimization/91173] Backport to GCC 8 and 9

2019-07-23 Thread Matthew Beliveau
Tested on GCC 8 and 9. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-07-23 Matthew Beliveau Backported from mainline 2019-07-16 Jeff Law PR rtl-optimization/91173 * tree-ssa-address.c (addr_for_mem_ref): If the base is an SSA_NAME with a constant value, fold its value i

[PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-07-23 Thread Richard Biener
The following fixes the runtime regression of 456.hmmer caused by matching ICC in code generation and using cmov more aggressively (through GIMPLE level MAX_EXPR usage). Appearantly (discovered by manual assembler editing) using the SSE unit for performing SImode loads, adds and then two singed

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Jeff Law
On 7/23/19 7:50 AM, Michael Matz wrote: > Hi, > > On Tue, 23 Jul 2019, Jeff Law wrote: > >>> great you found time to make this. It should become the default for >>> -flto IMO. >> I was going to hack it into the rpm configury bits since we have access >> to the # cores there. But an auto-selector

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Michael Matz
Hi, On Tue, 23 Jul 2019, Jeff Law wrote: > > great you found time to make this. It should become the default for > > -flto IMO. > I was going to hack it into the rpm configury bits since we have access > to the # cores there. But an auto-selector within GCC is even better. > > BTW, isn't this a

[PATCH][MSP430] Reject -m{code,data}-region options unless large memory model is selected

2019-07-23 Thread Jozef Lawrynowicz
The attached patch adds error messages to be emitted when -mcode/data-region are used without the accompanying -mlarge option that enables the large memory model. Use of the upper/either regions without -mlarge can cause relocation overflows or stack mismanagement when incorrect call/return instruc

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Richard Biener
On Tue, Jul 23, 2019 at 3:09 PM Jeff Law wrote: > > On 7/23/19 3:20 AM, Jan Hubicka wrote: > >> Hi. > >> > >> As we as openSUSE started using -flto, I see it very handy to have > >> an option value that will automatically detect number of cores > >> that can be used for parallel LTRANS phase. > >>

Re: Add ARRAY_REF based access patch disambiguation

2019-07-23 Thread Richard Biener
On Fri, 19 Jul 2019, Jan Hubicka wrote: > Hi, > this patch adds bare bones of disambiguation of access paths via > ARRAY_REF. Similarly to COMPONENT_REF we need a matched ARRAY_REF size > and prove that indexes are actually different. > > This adds about 20 new disambiguations to tramp3d. > > B

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Jeff Law
On 7/23/19 3:20 AM, Jan Hubicka wrote: >> Hi. >> >> As we as openSUSE started using -flto, I see it very handy to have >> an option value that will automatically detect number of cores >> that can be used for parallel LTRANS phase. >> >> Thoughts? > Hi, > great you found time to make this. It shoul

[PATCH][MSP430] Allow lower-case "r" to be used in register names by defining ADDITIONAL_REGISTER_NAMES (PR target/70320)

2019-07-23 Thread Jozef Lawrynowicz
The attached patch enables a lower-case "r" to be used in register names specified in asm statements clobber list or command line options, in addition to the upper case "R" that is currently supported. Successfully regtested on trunk for msp430-elf. Ok for trunk? >From d639b2ba7d4a93d790bde3ad55d

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > On Tue, 23 Jul 2019 at 17:48, Richard Biener wrote: > > > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > > > On Tue, 23 Jul 2019 at 16:36, Richard Biener wrote: > > > > > > > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > > > >

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Prathamesh Kulkarni
On Tue, 23 Jul 2019 at 17:48, Richard Biener wrote: > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > On Tue, 23 Jul 2019 at 16:36, Richard Biener wrote: > > > > > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > > > > > On Fri, 19 Jul 2019 at 18:12, Richard Sandiford > > > > wrot

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > On Tue, 23 Jul 2019 at 16:36, Richard Biener wrote: > > > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > > > On Fri, 19 Jul 2019 at 18:12, Richard Sandiford > > > wrote: > > > > > > > > Not really my area, but FWIW... > > > > > > > > Pra

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Prathamesh Kulkarni
On Tue, 23 Jul 2019 at 16:36, Richard Biener wrote: > > On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > > > On Fri, 19 Jul 2019 at 18:12, Richard Sandiford > > wrote: > > > > > > Not really my area, but FWIW... > > > > > > Prathamesh Kulkarni writes: > > > > Hi, > > > > The attached patch trie

Re: Use ODR for canonical types construction in LTO

2019-07-23 Thread Martin Liška
Hi. Honza can you please fix this: gcc/ipa-devirt.c:1616:12: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion] Thanks, Martin

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Prathamesh Kulkarni wrote: > On Fri, 19 Jul 2019 at 18:12, Richard Sandiford > wrote: > > > > Not really my area, but FWIW... > > > > Prathamesh Kulkarni writes: > > > Hi, > > > The attached patch tries to fix PR91166. > > > Does it look OK ? > > > Bootstrap+test in progress

[PATCH] [MIPS] Add machine mode to get_fcsr pattern operand

2019-07-23 Thread Mihailo Stojanovic
From: Mihailo Stojanovic Hi, Missing machine mode for the unspec_volatile operand of get_fcsr patterns causes an ICE in simplify_subreg on n64 ABI. This adds the missing machine modes and a new test. Tested on mips64el-mti-linux-gnu. Ok for trunk and possibly backport? Cheers, Mihailo gcc/

Re: PR91166 - Unfolded ZIPs of constants

2019-07-23 Thread Prathamesh Kulkarni
On Fri, 19 Jul 2019 at 18:12, Richard Sandiford wrote: > > Not really my area, but FWIW... > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch tries to fix PR91166. > > Does it look OK ? > > Bootstrap+test in progress on aarch64-linux-gnu and > > x86_64-unknown-linux-gnu. > > > > Than

[PATCH] Deduce automatically number of cores for -flto option.

2019-07-23 Thread Martin Liška
On 7/23/19 11:20 AM, Jan Hubicka wrote: > Hi, > great you found time to make this. It should become the default for > -flto IMO. Works for me. Then I'm suggesting to not come up with -flto=auto and only document that -flto passed during linking will automatically detect number of cores. It's the s

[PATCH] Fix PR91231

2019-07-23 Thread Richard Biener
With LTO it's easy to run out of linemap encoding space (surprisingly so for columns even though LTO never uses any column besides zero...). But some code cannot deal with locations being dropped to zero "after the fact" (without LTO you do not get re-encoding), in this example it is the inline-e

[PATCH] Fix PR83518 for aarch64

2019-07-23 Thread Richard Biener
This is the last piece to fix the testcase for aarch64 and it's gimplification of int a[] = { 1,2,3} to a = *.LC0; It also fixes having calls in GIMPLE FE IL when emitting a CFG. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-07-23 Richard Biener PR

Re: [PATCH] Remove a pointless global var

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Alexander Monakov wrote: > On Tue, 23 Jul 2019, Richard Biener wrote: > > > > Can you let me handle sort.cc changes once there's agreement > > > which way to go? > > > > Sure - feel free to give option 3 a shot. I'm just worried > > about the system.h redirect which would b

Re: [range-ops] patch 01/04: types for VR_UNDEFINED and VR_VARYING

2019-07-23 Thread Richard Biener
On Tue, Jul 23, 2019 at 1:59 AM Jeff Law wrote: > > On 7/16/19 12:37 PM, Andrew MacLeod wrote: > > On 7/9/19 5:56 AM, Richard Biener wrote: > >> On Tue, Jul 9, 2019 at 9:28 AM Aldy Hernandez wrote: > >>> > >>> > >>> On 7/4/19 6:33 AM, Richard Biener wrote: > On Wed, Jul 3, 2019 at 2:17 PM Al

Add znver2 scheduler model

2019-07-23 Thread Jan Hubicka
Hi, this patch adds znver2 scheduler model. Znver2 is close enough to znver1 that I have decided to implement it in one automaton. The main difference is extra AGU unit that seems to be used for store only (according to CPU diagram), the fact that 256bit vector operations are no longer split (and

Update X86_TUNE_AVOID_256FMA_CHAINS for znver2

2019-07-23 Thread Jan Hubicka
Hi, this patch enables logic which avoid FMA for matrix multiplicaiton loop for 256 bit vectors. The underlying issue is same as with znver1. While combined latency of mutliply and add operations is slower than FMA, the dependency chain in matrix multiplication depends only on additions that are fa

Re: [range-ops] patch 01/04: types for VR_UNDEFINED and VR_VARYING

2019-07-23 Thread Richard Biener
On Tue, Jul 16, 2019 at 8:37 PM Andrew MacLeod wrote: > > On 7/9/19 5:56 AM, Richard Biener wrote: > > On Tue, Jul 9, 2019 at 9:28 AM Aldy Hernandez wrote: > >> > >> > >> On 7/4/19 6:33 AM, Richard Biener wrote: > >>> On Wed, Jul 3, 2019 at 2:17 PM Aldy Hernandez wrote: > On 7/3/19 7:08 AM,

Update x86-tune-costs.h for znver2

2019-07-23 Thread Jan Hubicka
Hi, this patch updates znver2 costs to match reality. In particular we re-benchmarked memcpy strategies and it looks that glibc now wins even for relatively small blocks. Moreover I updated costs of moves to reflect that znver2 has 256 vector paths and faster multiplication. Bootstrapped/regtest

Re: [PATCH] Remove a pointless global var

2019-07-23 Thread Alexander Monakov
On Tue, 23 Jul 2019, Richard Biener wrote: > > Can you let me handle sort.cc changes once there's agreement > > which way to go? > > Sure - feel free to give option 3 a shot. I'm just worried > about the system.h redirect which would be then disabled for C? *nod* My preference would be to poi

Re: [PATCH] Come up with -flto=auto option.

2019-07-23 Thread Jan Hubicka
> Hi. > > As we as openSUSE started using -flto, I see it very handy to have > an option value that will automatically detect number of cores > that can be used for parallel LTRANS phase. > > Thoughts? Hi, great you found time to make this. It should become the default for -flto IMO. I think we

Re: [PATCH] Remove a pointless global var

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Alexander Monakov wrote: > On Tue, 23 Jul 2019, Richard Biener wrote: > > > OK, so like below. Slight complication is that C++ doesn't allow > > the void * to int (*)() casting which means we probably have to go > > with the template wrapper. I have to check if we use gcc_q

Re: [PATCH] Remove a pointless global var

2019-07-23 Thread Alexander Monakov
On Tue, 23 Jul 2019, Richard Biener wrote: > OK, so like below. Slight complication is that C++ doesn't allow > the void * to int (*)() casting which means we probably have to go > with the template wrapper. I have to check if we use gcc_qsort > from C code, the prototypes are currently in syste

[PATCH] Come up with -flto=auto option.

2019-07-23 Thread Martin Liška
Hi. As we as openSUSE started using -flto, I see it very handy to have an option value that will automatically detect number of cores that can be used for parallel LTRANS phase. Thoughts? gcc/ChangeLog: 2019-07-23 Martin Liska * doc/invoke.texi: Document the new option value.

[Ada] Eliminate redundant overflow checks for conversions from fixed-point

2019-07-23 Thread Pierre-Marie de Rodat
This eliminates redundant overflow checks that are generated for conversions from fixed-point to integer types when range checks are also enabled (which is the default), as the former checks are subsumed into the latter checks. No functional changes. Tested on x86_64-pc-linux-gnu, committed on tr

[Ada] Plug small loophole in Generate_Range_Check

2019-07-23 Thread Pierre-Marie de Rodat
The Generate_Range_Check routine is responsible for generating range checks in the scalar case. It automatically deals with possible overflow in the process when the source and the target base types are different. However there is one case where overflow is not dealt with correctly, namely when t

[Ada] Fix binding of ghost units with finalizer

2019-07-23 Thread Pierre-Marie de Rodat
Linking of an enabled ghost unit which requires a finalizer lead to an error, as the name generated by the binder for calling the finalizer was not the same as the name chosen by the compiler. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-23 Yannick Moy gcc/ada/

[Ada] Issue error on SPARK ownership rule violation

2019-07-23 Thread Pierre-Marie de Rodat
A modified rule in SPARK RM specifies that object declarations of anonymous access type should only occur immediately in subprogram, entry or block. Now checked. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-23 Yannick Moy gcc/ada/ * se

[Ada] Iterators are view-specific

2019-07-23 Thread Pierre-Marie de Rodat
Operational aspects, such as Default_Iterator, are view-specific, and if such an aspect appears on the full view of a private type, an object of the type cannot be iterated upon if it is not in the scope of the full view, This patch diagnoses properly an attempt to iterate over such an object. Tes

[Ada] Minor tweak to -gnatR output

2019-07-23 Thread Pierre-Marie de Rodat
This makes sure that the numbers present in the -gnatR output are printed in decimal format in all cases, since the hexadecimal format is not compatible with the JSON syntax. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-23 Eric Botcazou gcc/ada/ * repinfo.adb (List_Compo

Re: [PATCH] Remove a pointless global var

2019-07-23 Thread Richard Biener
On Mon, 22 Jul 2019, Alexander Monakov wrote: > Hi! > > On Mon, 22 Jul 2019, Richard Biener wrote: > > > I've noticed that we have quite some instances using qsort > > and passing down state to the comparator via a global var. > > Now that we have our own qsort implementation I wonder what > > t

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Kewen.Lin wrote: > on 2019/7/22 下午3:18, Richard Biener wrote: > > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > > > >> Hi! > >> > >> (Maybe I am missing half of the discussion -- sorry if so). > >> > >> I think we should have a new iv for just the doloop (which can have th

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-23 Thread Richard Biener
On Mon, 22 Jul 2019, Segher Boessenkool wrote: > On Mon, Jul 22, 2019 at 09:18:10AM +0200, Richard Biener wrote: > > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > > > > > Hi! > > > > > > (Maybe I am missing half of the discussion -- sorry if so). > > > > > > I think we should have a new iv f