Re: introduce -fcallgraph-info option

2019-11-04 Thread Richard Biener
On Sat, 2 Nov 2019, Alexandre Oliva wrote: > On Oct 30, 2019, Richard Biener wrote: > > > One way of operation would be to > > generate the graph during the compilation step > > Stack usage is only computed during prologue/epilogue generation in RTL. > > > Additional arguments to -fcallgraph-i

Re: [PATCH][RFC] C++-style iterators for FOR_EACH_IMM_USE_STMT

2019-11-04 Thread Richard Biener
On Sun, 3 Nov 2019, Oleg Endo wrote: > On Wed, 2019-10-30 at 10:27 +0100, Richard Biener wrote: > > > > Hmm, not sure - I'd like to write > > > > for (gimple *use_stmt : imm_stmt_uses (SSAVAR)) > >for (use_operand_p use_p : > from > > above>) > > ... > > > > I don't see how that's p

[PATCH] Fix PR92301

2019-11-04 Thread Richard Biener
The following fixes epilogue loop generation for reductions where the reduction result isn't live. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-11-04 Richard Biener PR tree-optimization/92301 * tree-vect-stmts.c (process_use): Force reduction

Re: [PATCH V3] rs6000: Refine small loop unroll in loop_unroll_adjust hook

2019-11-04 Thread Kewen.Lin
Hi Jeff, Thanks for the patch, I learned a lot from it. Some nits embedded. on 2019/11/4 下午2:31, Jiufu Guo wrote: > Hi, > > In this patch, loop unroll adjust hook is introduced for powerpc. We can do > target related hueristic adjustment in this hook. In this patch, small loops > is unrolled 2

Re: [PATCH] Fix hash_operand for fields of a CONSTRUCTOR.

2019-11-04 Thread Martin Liška
On 11/1/19 10:51 PM, Jeff Law wrote: On 10/31/19 10:01 AM, Martin Liška wrote: Hi. operand_equal_p can properly handle situation where we have a CONSTRUCTOR where indices are NULL: if (!operand_equal_p (c0->value, c1->value, flags) /* In GIMPLE the indexes can b

Ping: [PATCH V5] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-04 Thread Feng Xue OS
Hi, Honza & Martin, This is a new patch merged with the newest IPA changes. Would you please take a look at the patch? Together with the other patch on recursive function versioning, we can find more than 30% performance boost on exchange2 in spec2017. So, it will be good if two patches can en

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Richard Biener
On Fri, 1 Nov 2019, Joel Hutton wrote: > On 30/10/2019 13:49, Richard Biener wrote: > >> > >>  * expr.c (store_constructor): Add case for constructor of > vectors. > > Why do you need this?  The vectorizer already creates such CTORs.  Any > > testcase that you can show? > > > > type

Re: [PATCH V3] rs6000: Refine small loop unroll in loop_unroll_adjust hook

2019-11-04 Thread Jiufu Guo
"Kewen.Lin" writes: > Hi Jeff, > > Thanks for the patch, I learned a lot from it. Some nits embedded. Thanks for your comments! > > on 2019/11/4 下午2:31, Jiufu Guo wrote: >> Hi, >> >> In this patch, loop unroll adjust hook is introduced for powerpc. We can do >> target related hueristic adjustm

[patch,committed] PR92305 libgomp/testsuite - use unique numbers with Fortran's 'stop'

2019-11-04 Thread Tobias Burnus
Committed as obvious (Rev. 277769). Tobias PS: Highest number is 242 – which still fits into 8 bit. PPS: Instead of 'stop', one could also use 'error stop'. This prints 'error stop' instead of 'stop' on stderr and might print a backtrace, depending on the target/libbacktrace availablility. Ot

[wwwdocs] Update to the new home of the GNU Coding Standards

2019-11-04 Thread Gerald Pfeifer
Committed. Gerald - Log - commit cb3654b35594dc81dc78b01713142e4207d73191 Author: Gerald Pfeifer Date: Sun Nov 3 20:42:22 2019 + Update to the new home of the GNU Coding Standards Format the surrounding HTML sour

[COMMITTED] Regenerate gcc/configure

2019-11-04 Thread Jozef Lawrynowicz
r277753 regenerated gcc/configure but the version of autoconf used for the regeneration added lines to support "runstatedir". The attached patch is the result of regenerating configure with the correct version/configuration of autoconf. >From 04f59c00115d9e2517c15755f9058832703cb494 Mon Sep 17 00:

[patch] testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options

2019-11-04 Thread Tobias Burnus
This test case had from the beginning both ! { dg-do run } ! { dg-options "-O2" } However, 'dg-do run' implies torture, i.e. multiple optimization options, while 'dg-options "-O2"' implies -O2, only. This means that the test case is compiled 4 times with "-O0", "-O1", "-O3 -f…" and "-Os" – fol

Re: [patch] testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options

2019-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2019 at 01:18:58PM +0100, Tobias Burnus wrote: > This test case had from the beginning both > ! { dg-do run } > ! { dg-options "-O2" } > > However, 'dg-do run' implies torture, i.e. multiple optimization options, > while 'dg-options "-O2"' implies -O2, only. > > This means that

Re: [PR 70929] Remove gimple_call_types_likely_match_p... almost

2019-11-04 Thread Richard Biener
On Fri, 1 Nov 2019, Martin Jambor wrote: > Hi, > > I have spent some more time looking into PR 70929, how > gimple_check_call_matching_types behaves when LTO-building Firefox to > see what could replace it or if we perhaps could remove it. > > TL;DR: > I believe it can and should be removed, pos

[COMMITTED] Fix incorrect use of USE_TM_CLONE_REGISTRY in crtstuff.c

2019-11-04 Thread Jozef Lawrynowicz
r272769 added the --disable-tm-clone-registry configure option. This expects defining USE_TM_CLONE_REGISTRY to 0 to remove blocks of code from libgcc/crtstuff.c. However, some #if blocks in crtstuff.c only check whether USE_TM_CLONE_REGISTRY is defined, so when it is defined to 0, these will still

Re: [patch] testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options

2019-11-04 Thread Tobias Burnus
On 11/4/19 1:29 PM, Jakub Jelinek wrote: Note, pr66199-1.f90 has the same issue. And I'd probably go for the removal of dg-do run instead. Well, there are even more (ignoring those which have -std=legacy or -fno-inline or … in dg-options): libgomp.fortran/examples-4/declare_target-5.f90, lib

Re: [patch] testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options

2019-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2019 at 02:02:38PM +0100, Tobias Burnus wrote: > On 11/4/19 1:29 PM, Jakub Jelinek wrote: > > Note, pr66199-1.f90 has the same issue. And I'd probably go for the > > removal of dg-do run instead. > > Well, there are even more (ignoring those which have -std=legacy or > -fno-inline

Re: PR92163

2019-11-04 Thread Christophe Lyon
On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni wrote: > > On Mon, 28 Oct 2019 at 07:18, Richard Biener > wrote: > > > > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni > > wrote: > > > > > > On Fri, 25 Oct 2019 at 13:19, Richard Biener > > > wrote: > > > > > > > > On Wed, Oct 23, 2019

Re: [PATCH] Fix hash_operand for fields of a CONSTRUCTOR.

2019-11-04 Thread Richard Biener
On Mon, Nov 4, 2019 at 10:09 AM Martin Liška wrote: > > On 11/1/19 10:51 PM, Jeff Law wrote: > > On 10/31/19 10:01 AM, Martin Liška wrote: > >> Hi. > >> > >> operand_equal_p can properly handle situation where we have a CONSTRUCTOR > >> where indices are NULL: > >> > >>if (!operand_equ

Re: [PATCH] Fix hash_operand for fields of a CONSTRUCTOR.

2019-11-04 Thread Richard Biener
On Mon, Nov 4, 2019 at 2:35 PM Richard Biener wrote: > > On Mon, Nov 4, 2019 at 10:09 AM Martin Liška wrote: > > > > On 11/1/19 10:51 PM, Jeff Law wrote: > > > On 10/31/19 10:01 AM, Martin Liška wrote: > > >> Hi. > > >> > > >> operand_equal_p can properly handle situation where we have a CONSTRUC

Re: [FYI] pass --enable-obsolete to build configure

2019-11-04 Thread Alexandre Oliva
On Nov 3, 2019, Andreas Schwab wrote: > Don't add unreleated changes. Oh, thanks, I'm glad I failed to omit the regenerated file from the email, I might have otherwise missed the unexpected changes made by Trisquel's autoconf. I've installed a pristine autoconf-2.69 from ftp.gnu.org, and used

Re: [PATCH v2] PR85678: Change default to -fno-common

2019-11-04 Thread Richard Biener
On Wed, Oct 30, 2019 at 3:33 PM Wilco Dijkstra wrote: > > Hi Richard, > > > Please don't add -fcommon in lto.exp. > > So what is the best way to add an extra option to lto.exp? > Note dg-lto-options completely overrides the options from lto.exp, so I can't > use that except in tests which already

[PATCH] ggc-common.c bootstrap breakage

2019-11-04 Thread David Edelsohn
The change to add malloc.h to ggc-common.c broke bootstrap. system.h must be included before system header files. The following patch fixes this, committed as obvious with concurrence by Richi. Thanks, David * ggc-common.c: Include system.h before malloc.h. Index: ggc-common.c

Re: [PATCH] ggc-common.c bootstrap breakage

2019-11-04 Thread Richard Biener
On Mon, Nov 4, 2019 at 2:55 PM David Edelsohn wrote: > > The change to add malloc.h to ggc-common.c broke bootstrap. system.h > must be included before system header files. The following patch > fixes this, committed as obvious with concurrence by Richi. Broke x86. I'm testing the attached. R

Optimize handling of inline summaries

2019-11-04 Thread Jan Hubicka
Hi, this patch turns edge growth cache into fast summary and fixes some fallout. I have noticed that we still use get_create on many places to access inline edge summary and turning them into gets uncovered furhter problems. I have added sanity check to estimate_calls_size_and_time that inlined e

Re: [Patch,Fortran] PR92284 – gfc_desc_to_cfi_desc fixes

2019-11-04 Thread Tobias Burnus
I have now committed the patch to the GCC 9 branch – and added the test case for PR92277 (the ICE was a GCC 10 regression, only). – Rev. 277781. Thanks for the review. Tobias PS: The release-manage item came up because the GCC home page linked to the wrong GCC 9 status report (pre-9.2 release

[PATCH] Fix PR92345

2019-11-04 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-11-04 Richard Biener PR tree-optimization/92345 * tree-vect-loop.c (vect_is_simple_reduction): Return whether we produced a reduction chain. (vect_analyze_scalar_cycles_1): Do not add

Re: Optimize handling of inline summaries

2019-11-04 Thread Martin Liška
On 11/4/19 3:12 PM, Jan Hubicka wrote: Martin, do you know why this flag was introduced? Hi. The flag is used in IPA CP: call_summary class edge_clone_summary { ... cgraph_edge *prev_clone; cgraph_edge *next_clone; } Apparently, IPA CP links all clones in one linked link. If you disabl

Re: [PATCH v2] PR85678: Change default to -fno-common

2019-11-04 Thread Wilco Dijkstra
Hi Richard, >> > Please don't add -fcommon in lto.exp. >> >> So what is the best way to add an extra option to lto.exp? >> Note dg-lto-options completely overrides the options from lto.exp, so I can't >> use that except in tests which already use it. > > On what testcases do you need it at all? T

[D] Remove unchecked to_constant in VECTOR_TYPE handling

2019-11-04 Thread Richard Sandiford
The SVE port now tries to register variable-length VECTOR_TYPEs at start-up, so it's no longer possible to use the asserting to_constant on the number of vector elements. This patch punts on variable element counts instead, just like we do for other things that the frontend doesn't recognise. The

Re: [PATCH] Add if-chain to switch conversion pass.

2019-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2019 at 03:23:20PM +0100, Martin Liška wrote: > The patch adds a new pass that identifies a series of if-elseif > statements and transform then into a GIMPLE switch (if possible). > The pass runs right after tree-ssa pass and I decided to implement > matching of various forms that a

Re: [Patch][Fortran] PR 92208 don't use function-result dummy variable as actual argument

2019-11-04 Thread Tobias Burnus
On 10/30/19 8:06 PM, Thomas Koenig wrote: OK for the trunk and GCC 9? As far as I can see, this looks good. So, OK for trunk. If it later turns out that there are problems caused by this, I suspect we will hear about them soon enough :-) What shall we do about GCC 9? https://gcc.gnu.org/PR92

Re: [Patch][Fortran] PR 92208 don't use function-result dummy variable as actual argument

2019-11-04 Thread Thomas König
Hi Tobias, I think this is also OK for gcc 9. Backporting regression fixes should always be all right under normal circumstances. Regards Thomas

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-04 Thread Vladimir Makarov
On 2019-11-02 1:28 p.m., Kwok Cheung Yeung wrote: The AMD GCN architecture uses 64-bit pointers, but the scalar registers are 32-bit wide, so pointers must reside in a pair of registers. The two hard registers holding the frame pointer are currently fixed, but if they are changed to unfixed

[0/4] Vector epilogues vs. mixed vector sizes

2019-11-04 Thread Richard Sandiford
This patch bridges the gap between the recent epilogue vectorisation patches and https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01822.html . I don't have any evidence that the series is independently useful, but it shouldn't make things worse either. Tested individually on aarch64-linux-gnu and as

Re: [PATCH] Fix hash_operand for fields of a CONSTRUCTOR.

2019-11-04 Thread Jeff Law
On 11/4/19 6:35 AM, Richard Biener wrote: > On Mon, Nov 4, 2019 at 10:09 AM Martin Liška wrote: >> >> On 11/1/19 10:51 PM, Jeff Law wrote: >>> On 10/31/19 10:01 AM, Martin Liška wrote: Hi. operand_equal_p can properly handle situation where we have a CONSTRUCTOR where indices a

Re: [PATCH] Fix hash_operand for fields of a CONSTRUCTOR.

2019-11-04 Thread Jeff Law
On 11/4/19 6:36 AM, Richard Biener wrote: > On Mon, Nov 4, 2019 at 2:35 PM Richard Biener > wrote: >> >> On Mon, Nov 4, 2019 at 10:09 AM Martin Liška wrote: >>> >>> On 11/1/19 10:51 PM, Jeff Law wrote: On 10/31/19 10:01 AM, Martin Liška wrote: > Hi. > > operand_equal_p can proper

[1/4] Restructure vect_analyze_loop

2019-11-04 Thread Richard Sandiford
Once vect_analyze_loop has found a valid loop_vec_info X, we carry on searching for alternatives if (1) X doesn't satisfy simdlen or (2) we want to vectorise the epilogue of X. I have a patch that optionally adds a third reason: we want to see if there are cheaper alternatives to X. This patch re

[2/4] Check the VF is small enough for an epilogue loop

2019-11-04 Thread Richard Sandiford
The number of iterations of an epilogue loop is always smaller than the VF of the main loop. vect_analyze_loop_costing was taking this into account when deciding whether the loop is cheap enough to vectorise, but that has no effect with the unlimited cost model. We need to use a separate check fo

[4/4] Use scan-tree-dump instead of scan-tree-dump-times for some vect tests

2019-11-04 Thread Richard Sandiford
With later patches, we're able to vectorise the epilogues of these tests on AArch64 and so get two instances of "vectorizing stmts using SLP". Although it would be possible with a bit of effort to predict when this happens, it doesn't seem important whether we get 1 vs. 2 occurrences. All that mat

[3/4] Don't vectorise single-iteration epilogues

2019-11-04 Thread Richard Sandiford
With a later patch I saw a case in which we peeled a single iteration for gaps but didn't need to peel further iterations to make up a full vector. We then tried to vectorise the single-iteration epilogue. 2019-11-04 Richard Sandiford gcc/ * tree-vect-loop.c (vect_analyze_loop): Only

[Patch][AMD GCN][OpenMP] Add gcc/config/gcn/t-omp-device for OpenMP declare variant kind/arch/isa

2019-11-04 Thread Tobias Burnus
This adds gcc/config/gcn/t-omp-device to augment the nvptx, hsa and x86 host implementation. This compiler has -march= carrizo/fiji/gfx900/gfx906 (for Corrizo, Fiji and Vega GPUs; arch names aligned with LLVM and passed on to the linker). This patch uses kind = "gnu" and those -march names fo

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Joel Hutton
First copy bounced from mailing list. > > On 30/10/2019 13:49, Richard Biener wrote: > >  >> > >  >>  * expr.c (store_constructor): Add case for constructor of > > vectors. > >  > Why do you need this?  The vectorizer already creates such CTORs.  Any > >  > testcase that you can show

Re: [Patch][AMD GCN][OpenMP] Add gcc/config/gcn/t-omp-device for OpenMP declare variant kind/arch/isa

2019-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2019 at 04:31:10PM +0100, Tobias Burnus wrote: > This adds gcc/config/gcn/t-omp-device to augment the nvptx, hsa and x86 host > implementation. > > This compiler has -march= carrizo/fiji/gfx900/gfx906 (for Corrizo, Fiji and > Vega GPUs; arch names aligned with LLVM and passed on to

Re: [RFH][libgcc] fp-bit bit ordering (PR 78804)

2019-11-04 Thread Jeff Law
On 11/3/19 5:12 AM, Oleg Endo wrote: > On Fri, 2019-10-11 at 23:27 +0900, Oleg Endo wrote: >> On Thu, 2019-10-03 at 19:34 -0600, Jeff Law wrote: >>> >>> So probably the most interesting target for this test is v850-elf >>> as >>> it's got a reasonably well functioning simulator, hard and soft FP >>

Re: [D] Remove unchecked to_constant in VECTOR_TYPE handling

2019-11-04 Thread Jeff Law
On 11/4/19 7:40 AM, Richard Sandiford wrote: > The SVE port now tries to register variable-length VECTOR_TYPEs > at start-up, so it's no longer possible to use the asserting > to_constant on the number of vector elements. This patch punts > on variable element counts instead, just like we do for o

Re: [PATCH v2] PR92090: Fix testcase failures by r276469

2019-11-04 Thread Jeff Law
On 11/3/19 8:29 PM, luoxhu wrote: > -finline-functions is enabled by default for O2 since r276469, update the > test cases with -fno-inline-functions. > > v2: disable inlining for the failed cases. Add two more failed cases > not listed in BZ. Tested on P8LE, P8BE and P9LE. > > > gcc/testsuite

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-04 Thread Georg-Johann Lay
Am 04.11.19 um 16:22 schrieb Vladimir Makarov: On 2019-11-02 1:28 p.m., Kwok Cheung Yeung wrote: The AMD GCN architecture uses 64-bit pointers, but the scalar registers are 32-bit wide, so pointers must reside in a pair of registers. The two hard registers holding the frame pointer are curre

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Richard Biener
On November 4, 2019 4:30:57 PM GMT+01:00, Joel Hutton wrote: >First copy bounced from mailing list. > > > On 30/10/2019 13:49, Richard Biener wrote: > > >  >> >> >  >>  * expr.c (store_constructor): Add case for constructor >of > > > vectors. > > >  > Why do you need this?  The vectorizer

Re: [Patch][AMD GCN][OpenMP] Add gcc/config/gcn/t-omp-device for OpenMP declare variant kind/arch/isa

2019-11-04 Thread Andrew Stubbs
On 04/11/2019 15:37, Jakub Jelinek wrote: My preference would be that arch on amdgcn is something like amdgcn or gcn. I hope the general distinction between arch and isa will be something that will be discussed next Tuesday on the language committee, so hopefully we'll know more afterwards and ca

Re: [Patch][AMD GCN][OpenMP] Add gcc/config/gcn/t-omp-device for OpenMP declare variant kind/arch/isa

2019-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2019 at 04:33:27PM +, Andrew Stubbs wrote: > On 04/11/2019 15:37, Jakub Jelinek wrote: > > My preference would be that arch on amdgcn is something like amdgcn or gcn. > > I hope the general distinction between arch and isa will be something that > > will be discussed next Tuesda

Re: [PATCH][AArch64] Implement Armv8.5-A memory tagging (MTE) intrinsics

2019-11-04 Thread Kyrill Tkachov
Hi Dennis, On 10/17/19 11:03 AM, Dennis Zhang wrote: Hi, Arm Memory Tagging Extension (MTE) is published with Armv8.5-A. It can be used for spatial and temporal memory safety detection and lightweight lock and key system. This patch enables new intrinsics leveraging MTE instructions to impleme

Re: [PATCH, GCC/ARM, 1/10] Fix -mcmse check in libgcc

2019-11-04 Thread Kyrill Tkachov
Hi Mihail, On 10/23/19 10:26 AM, Mihail Ionescu wrote: [PATCH, GCC/ARM, 1/10] Fix -mcmse check in libgcc Hi, === Context === This patch is part of a patch series to add support for Armv8.1-M Mainline Security Extensions architecture. Its purpose is to fix the check to determine whether -mcmse

Re: [PATCH, GCC/ARM, 2/10] Add command line support for Armv8.1-M Mainline

2019-11-04 Thread Kyrill Tkachov
Hi Mihail, On 10/23/19 10:26 AM, Mihail Ionescu wrote: [PATCH, GCC/ARM, 2/10] Add command line support Hi, === Context === This patch is part of a patch series to add support for Armv8.1-M Mainline Security Extensions architecture. Its purpose is to add command-line support for that new archi

Re: [PATCH 1/2] [ARM,testsuite] Skip tests incompatible with -mpure-code

2019-11-04 Thread Kyrill Tkachov
Hi Christophe, On 10/18/19 2:18 PM, Christophe Lyon wrote: Hi, All these tests fail when using -mpure-code: * some force A or R profile * some use Neon * some use -fpic/-fPIC all of which are not supported by this option. OK? Hmm... I'm tempted to ask if it would be simpler to add a check f

Re: [PR47785] COLLECT_AS_OPTIONS

2019-11-04 Thread H.J. Lu
On Sun, Nov 3, 2019 at 6:45 PM Kugan Vivekanandarajah wrote: > > Thanks for the reviews. > > > On Sat, 2 Nov 2019 at 02:49, H.J. Lu wrote: > > > > On Thu, Oct 31, 2019 at 6:33 PM Kugan Vivekanandarajah > > wrote: > > > > > > On Wed, 30 Oct 2019 at 03:11, H.J. Lu wrote: > > > > > > > > On Sun, O

[PATCH][vect] Disable vectorization of epilogues for loops with SIMDUID set

2019-11-04 Thread Andre Vieira (lists)
Hi, I was using loop->simdlen to detect whether it was a SIMD loop and I don't believe that was correct, as can be witnessed by the mass failures in libgomp. My apologies for not running this, didn't think of it! I found that these were failing because we do not handle vectorization of epilo

[PATCH] avoid assuming struct, memebers have constant sizes (PR 92349)

2019-11-04 Thread Martin Sebor
The recent -Warray-bounds enhancement to detect past-the-end accesses to struct members has introduced the assumption that struct members have constant sizes. That assumption is not safe for the GCC VLA member extension. The attached change removes the assumption without attempting to handle pas

Fix PR testsuite/92302

2019-11-04 Thread Eric Botcazou
This makes the test more robust by relaxing the regexp. Tested on SPARC/Solaris 11, applied on the mainline. 2019-11-04 Eric Botcazou PR testsuite/92302 * gcc.target/sparc/sparc-ret-3.c: Accept more registers in address. -- Eric BotcazouIndex: gcc.target/sparc/sparc-ret-3.c

Re: Optimize handling of inline summaries

2019-11-04 Thread Jan Hubicka
> On 11/4/19 3:12 PM, Jan Hubicka wrote: > > Martin, do you know why this flag was introduced? > > Hi. > > The flag is used in IPA CP: > > call_summary > > class edge_clone_summary > { > ... > cgraph_edge *prev_clone; > cgraph_edge *next_clone; > } I see, so it is there to collect chains

[committed][middle-end][SLP] Initialize variable to fix bootstrap after r277784.

2019-11-04 Thread Tamar Christina
Hi All, This initializes the rstmt variable with NULL and adds an assert to check that a value has been given by one of the if cases before use. This fixes the bootstrap failure due to -Werror. Bootstrapped on aarch64-none-linux-gnu and no issues. Committed under the gcc obvious rule. gcc/Chan

Avoid trashing of polymorphic call cache during inlining

2019-11-04 Thread Jan Hubicka
Hi, I am not really pround of this implementation (and will think of better interface), but this patch saves about 10% of WPA time by avoiding unnecesary invalidations of the polymorphic call target hash during inlining. ipa-devirt register node removal hook to invalidate cache when one of functio

[committed] add debugging routines for assert_info structure

2019-11-04 Thread Aldy Hernandez
We have a way of dumping the asserts in the asserts_for on-the-side structure, but we have no way of dumping the assert_info structure that evrp uses. Being able to dump these are quite useful in debugging. Committed as obvious. commit 9244efff3f7ccce390c70c83d9fc46cef6152bb4 Author: Aldy Hern

[committed] handle VR_UNDEFINED in normalize_addresses

2019-11-04 Thread Aldy Hernandez
We are currently ICEing when calling normalize_address on an undefined range because undefines do not have types. Committed as obvious. commit 12cdfbe483c8981ba724582c1faa1432e762b549 Author: Aldy Hernandez Date: Mon Nov 4 12:16:37 2019 +0100 Handle VR_UNDEFINED in value_range_base::norm

[committed] remove unused range_int_cst_singleton_p

2019-11-04 Thread Aldy Hernandez
This function is no longer being called. The behavior in it is handled by the API (value_range_base::singleton_p). Committed as obvious. commit 9d22f224ec66efb0abf1394bff7e3d0080498417 Author: Aldy Hernandez Date: Mon Nov 4 12:46:00 2019 +0100 Remove unused range_int_cst_singleton_p.

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-04 Thread Dimitar Dimitrov
On Sat, 2 Nov 2019, 19:28:38 EET Kwok Cheung Yeung wrote: > The AMD GCN architecture uses 64-bit pointers, but the scalar registers > are 32-bit wide, so pointers must reside in a pair of registers. ... > Bootstrapped on x86_64 and tested with no regressions, which is not > surprising as nothing di

always handle pointers in vrp_val*{min,max}

2019-11-04 Thread Aldy Hernandez
When I added the range-ops code, I had to teach vrp_val_is*{min,max} about pointers, since it would just ignore them and return NULL. I was overly cautious about changing existing behavior and decided to add a handle_pointers argument, with a default value of FALSE, and just changed the needed

Re: [PATCH, rs6000] Make load cost more in vectorization cost for P8/P9

2019-11-04 Thread Segher Boessenkool
Hi! On Mon, Nov 04, 2019 at 03:16:06PM +0800, Kewen.Lin wrote: > To align with rs6000_insn_cost costing more for load type insns, (Which itself has history in rs6000_rtx_costs). > this patch is to make load insns cost more in vectorization cost > function. Considering that the result of load us

Re: [PATCH V3] rs6000: Refine small loop unroll in loop_unroll_adjust hook

2019-11-04 Thread Segher Boessenkool
Hi! On Mon, Nov 04, 2019 at 02:31:43PM +0800, Jiufu Guo wrote: > In this patch, loop unroll adjust hook is introduced for powerpc. We can do > target related hueristic adjustment in this hook. In this patch, small loops > is unrolled 2 times for O2 and O3 by default. With this patch, we can see

[committed] do not create non-canonical ranges in value_range_base::invert

2019-11-04 Thread Aldy Hernandez
value_range_base::invert is twiddling the range kind in place. You can't do that, because you may create non-canonical ranges. Fixed by using the canonicalizing constructor. Committed as obvious. commit 7a1b10ff2446e3e7800a19e8970bfe57f894cda9 Author: Aldy Hernandez Date: Mon Nov 4 21:15:4

Initialize global.statics_read in ipa-reference

2019-11-04 Thread Jan Hubicka
Hi, while working on allocator reorg for summaries I noticed that we never initialize statics_read in ipa-reference which is later used to bookkeep the strongly connected components. I am bit surprised that this ever worked w/o crashing, but it seems to be the case. Bootstrapped/regteted x86_64-l

Re: [PATCH] Support multiple registers for the frame pointer

2019-11-04 Thread Georg-Johann Lay
Kwok Cheung Yeung schrieb: The AMD GCN architecture uses 64-bit pointers, but the scalar registers are 32-bit wide, so pointers must reside in a pair of registers. The two hard registers holding the frame pointer are currently fixed, but if they are changed to unfixed (so that the FP can be el

Re: always handle pointers in vrp_val*{min,max}

2019-11-04 Thread Andrew MacLeod
On 11/4/19 3:03 PM, Aldy Hernandez wrote: When I added the range-ops code, I had to teach vrp_val_is*{min,max} about pointers, since it would just ignore them and return NULL. I was overly cautious about changing existing behavior and decided to add a handle_pointers argument, with a default va

[PATCH] avoid folding of invalid indices to compound literals (PR 92341)

2019-11-04 Thread Martin Sebor
While testing some other changes I noticed that -Warray-bounds fails to detect out-of-bounds indices to compound literals such as in: int *p = (int[]){ 1, 2, 3 }; // ... p[3] = 7; This is because SRA transforms such references into accesses to uninitialized scalar variables and also sets t

do not special case pointers while canonicalizing ranges

2019-11-04 Thread Aldy Hernandez
There's no need to special case pointers when converting suitable VR_ANTI_RANGE's into VR_RANGE's now that vrp_val*{min, max} handle pointers by default. OK?

Re: do not special case pointers while canonicalizing ranges

2019-11-04 Thread Aldy Hernandez
And now with patch! On 11/4/19 11:15 PM, Aldy Hernandez wrote: There's no need to special case pointers when converting suitable VR_ANTI_RANGE's into VR_RANGE's now that vrp_val*{min, max} handle pointers by default. OK? commit 2a8a783d542158405d2b90b5361669a8aa56ea83 Author: Aldy Hernandez

handle symbolics when comparing ranges

2019-11-04 Thread Aldy Hernandez
value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Although this isn't causing a problem yet, as soon as someone tries to compare non numeric ranges, we'll die. Using operand_equal_p simplifies

Re: [PATCH] avoid folding of invalid indices to compound literals (PR 92341)

2019-11-04 Thread Jeff Law
On 11/4/19 3:05 PM, Martin Sebor wrote: > While testing some other changes I noticed that -Warray-bounds > fails to detect out-of-bounds indices to compound literals such > as in: > >   int *p = (int[]){ 1, 2, 3 }; >   // ... >   p[3] = 7; > > This is because SRA transforms such references into a

Re: do not special case pointers while canonicalizing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 5:17 PM, Aldy Hernandez wrote: And now with patch! On 11/4/19 11:15 PM, Aldy Hernandez wrote: There's no need to special case pointers when converting suitable VR_ANTI_RANGE's into VR_RANGE's now that vrp_val*{min, max} handle pointers by default. OK? this seems fine, and skirts

[PATCH][C++] * typeck.c (check_return_expr): Avoid redundant error.

2019-11-04 Thread Jason Merrill
I noticed that when returning an ambiguous call in a void function, we then uselessly gave another error about returning a non-void expression. Tested x86_64-pc-linux-gnu, applying to trunk. --- gcc/cp/typeck.c | 2 +- gcc/testsuite/g++.dg/other/return2.C | 7 +++ 2 fil

Re: [PATCH v2] PR92090: Fix testcase failures by r276469

2019-11-04 Thread Segher Boessenkool
Hi! On Mon, Nov 04, 2019 at 11:29:56AM +0800, luoxhu wrote: > -finline-functions is enabled by default for O2 since r276469, update the > test cases with -fno-inline-functions. Jeff already okay'ed it; just some changelog nits: > 2019-10-30 Xiong Hu Luo > > PR92090 PR other/9209

Re: handle symbolics when comparing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Although this isn't causing a problem yet, as soon as someone tries to compare non numeric ranges, we

Re: [PATCH v2] PR92090: Fix testcase failures by r276469

2019-11-04 Thread Joseph Myers
On Mon, 4 Nov 2019, luoxhu wrote: > -finline-functions is enabled by default for O2 since r276469, update the > test cases with -fno-inline-functions. > > v2: disable inlining for the failed cases. Add two more failed cases > not listed in BZ. Tested on P8LE, P8BE and P9LE. If inlining (or oth

Re: handle symbolics when comparing ranges

2019-11-04 Thread Aldy Hernandez
On 11/4/19 11:45 PM, Andrew MacLeod wrote: On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Although this isn't causing a problem yet, as soon as so

Re: [PR47785] COLLECT_AS_OPTIONS

2019-11-04 Thread Kugan Vivekanandarajah
Hi, Thanks for the review. On Tue, 5 Nov 2019 at 03:57, H.J. Lu wrote: > > On Sun, Nov 3, 2019 at 6:45 PM Kugan Vivekanandarajah > wrote: > > > > Thanks for the reviews. > > > > > > On Sat, 2 Nov 2019 at 02:49, H.J. Lu wrote: > > > > > > On Thu, Oct 31, 2019 at 6:33 PM Kugan Vivekanandarajah >

Re: [PATCH v3] Updated the Fix:

2019-11-04 Thread Jason Merrill
On 11/3/19 6:42 AM, Kamlesh Kumar wrote: ChangeLog Entries: gcc/cp -- 2019-11-02 Kamlesh Kumar PR c++/91979 - mangling nullptr expression * cp/mangle.c (write_template_arg_literal): Handle nullptr mangling. gcc -- 2019-11-02 Kamlesh Kumar * co

Re: [PATCH] Allow libcalls for complex memcpy when optimizing for size.

2019-11-04 Thread Jeff Law
On 10/31/19 5:41 PM, Jim Wilson wrote: > The RISC-V backend wants to use a libcall when optimizing for size if > more than 6 instructions are needed. Emit_move_complex asks for no > libcalls. This case requires 8 insns for rv64 and 16 insns for rv32, > so we get fallback code that emits a loop.

Re: Ping: [PATCH V5] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-04 Thread Martin Jambor
Hi, On Mon, Nov 04 2019, Feng Xue OS wrote: > Hi, Honza & Martin, > > This is a new patch merged with the newest IPA changes. Would you > please take a look at the patch? Together with the other patch on > recursive function versioning, we can find more than 30% performance > boost on exchange2 i

Re: [PATCH, rs6000] Make load cost more in vectorization cost for P8/P9

2019-11-04 Thread Kewen.Lin
Hi Segher, Thanks for the comments! on 2019/11/5 上午4:21, Segher Boessenkool wrote: > Hi! > > On Mon, Nov 04, 2019 at 03:16:06PM +0800, Kewen.Lin wrote: >> To align with rs6000_insn_cost costing more for load type insns, > > (Which itself has history in rs6000_rtx_costs). > >> this patch is to

Re: handle symbolics when comparing ranges

2019-11-04 Thread Andrew MacLeod
On 11/4/19 6:05 PM, Aldy Hernandez wrote: On 11/4/19 11:45 PM, Andrew MacLeod wrote: On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but symbolics do exist in mainline. Although this

Re: [PATCH 1/3] [ARC] Cleanup sign/zero extend patterns

2019-11-04 Thread Jeff Law
On 10/22/19 2:21 AM, Claudiu Zissulescu wrote: > Cleanup sign/zero extend patterns (corrects the asm output string and > constraint letters). > > gcc/ > -xx-xx Claudiu Zissulescu > > * config/arc/arc.md (zero_extendqihi2_i): Cleanup pattern. > (zero_extendqisi2_ac): Likewise.

Re: [PATCH 2/3] [ARC] Update mea option documentation

2019-11-04 Thread Jeff Law
On 10/22/19 2:21 AM, Claudiu Zissulescu wrote: > Update -mea option documentation. > > gcc/ > -xx-xx Claudiu Zissulescu > > * config/arc/arc.opt (mea): Update help string. > * doc/invoke.texi(ARC): Update mea option info. OK jeff

Re: [PATCH 3/3] [ARC] Don't split ior/mov predicated insns.

2019-11-04 Thread Jeff Law
On 10/22/19 2:21 AM, Claudiu Zissulescu wrote: > Do not split immediate constants for predicated instructions. > > gcc/ > -xx-xx Claudiu Zissulescu > > * config/arc/arc.c (arc_split_ior): Add asserts. > (arc_split_mov_const): Likewise. > (arc_check_ior_const): Do not matc

[PATCH] handle constant size VLAs in -Warray-bounds (PR 82608, 92333)

2019-11-04 Thread Martin Sebor
-Warray-bounds doesn't yet have the logic to detect out-of-bounds indices into dynamically allocated arrays like VLAs because it doesn't track allocation calls. But the warning could detect such errors in accesses to VLAs with constant sizes even without such tracking. The attached patch adds th

Re: handle symbolics when comparing ranges

2019-11-04 Thread Aldy Hernandez
On 11/5/19 3:55 AM, Andrew MacLeod wrote: On 11/4/19 6:05 PM, Aldy Hernandez wrote: On 11/4/19 11:45 PM, Andrew MacLeod wrote: On 11/4/19 5:23 PM, Aldy Hernandez wrote: value_range_base::operator== was originally lifted from a world where symbolics didn't exist (the ranger branch), but sym

Re: [PATCH v3] PR92090: Fix testcase failures by r276469

2019-11-04 Thread luoxhu
Hi, On 2019/11/5 06:57, Joseph Myers wrote: > On Mon, 4 Nov 2019, luoxhu wrote: > >> -finline-functions is enabled by default for O2 since r276469, update the >> test cases with -fno-inline-functions. >> >> v2: disable inlining for the failed cases. Add two more failed cases >> not listed in BZ.

[committed] make vrp_bitmap_equal_p static

2019-11-04 Thread Aldy Hernandez
This function is only used once, so there's no need for it to be externally visible. Committed as obvious. commit 53363b9234db6e3b696abc53b24ea1e0d2547038 Author: Aldy Hernandez Date: Tue Nov 5 05:10:41 2019 +0100 Move vrp_bitmap_equal_p above its only use and make it static. diff --git

Re: [PATCH] handle constant size VLAs in -Warray-bounds (PR 82608, 92333)

2019-11-04 Thread Jeff Law
On 11/4/19 8:26 PM, Martin Sebor wrote: > -Warray-bounds doesn't yet have the logic to detect out-of-bounds > indices into dynamically allocated arrays like VLAs because it > doesn't track allocation calls.  But the warning could detect > such errors in accesses to VLAs with constant sizes even wit

Re: PR92163

2019-11-04 Thread Prathamesh Kulkarni
On Mon, 4 Nov 2019 at 18:37, Christophe Lyon wrote: > > On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni > wrote: > > > > On Mon, 28 Oct 2019 at 07:18, Richard Biener > > wrote: > > > > > > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Fri, 25 Oct 2019 at

Re: [PATCH v2] PR92090: Fix testcase failures by r276469

2019-11-04 Thread Kewen.Lin
on 2019/11/5 上午6:57, Joseph Myers wrote: > On Mon, 4 Nov 2019, luoxhu wrote: > >> -finline-functions is enabled by default for O2 since r276469, update the >> test cases with -fno-inline-functions. >> >> v2: disable inlining for the failed cases. Add two more failed cases >> not listed in BZ. Te

  1   2   >