[PATCH] Fix up gcc.dg/type-convert-var.c testcase (was Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch))

2019-07-29 Thread Jakub Jelinek
On Tue, Jul 02, 2019 at 04:43:54PM +, Tamar Christina wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/type-convert-var.c > @@ -0,0 +1,9 @@ > +/* { dg-do compile } */ > +/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ > +void foo (float a, float b, float *c) > +{ > + double e =

Re: [patch, fortran] Fix PR 90813

2019-07-29 Thread Thomas Koenig
Hi Paul, That is very well done. Thanks for picking it up and running with it. OK on both the fix and the dumping of the gsymbols. Committed, thanks. You might consider back porting both this patch and my fix for the original bug to 9-branch. Both patches apply cleanly together on gcc-9 (w

[PATCH, i386]: Some further movstrict cleanups

2019-07-29 Thread Uros Bizjak
Attached patch allows only SUBREGs as output operands to movstrict expander and further allows only register operand outputs in various corresponding splitters. This enforces the restriction, as documented for STRICT_LOW_PART RTX: This expression code is used in only one context: as the

Re: [PATCH] Fix simd attribute handling on aarch64 (version 2)

2019-07-29 Thread Steve Ellcey
Ping. Steve Ellcey sell...@marvell.com On Mon, 2019-07-22 at 11:25 -0700, Steve Ellcey wrote: > On Fri, 2019-07-19 at 19:24 +0100, Richard Sandiford wrote: > > > > You can probably also remove: > > > > tree new_type = build_distinct_type_copy (TREE_TYPE (node- > > >decl)); > > ... >

Re: [PATCH 4/5, OpenACC] Allow optional arguments to be used in the use_device OpenACC clause

2019-07-29 Thread Kwok Cheung Yeung
On 12/07/2019 12:38 pm, Kwok Cheung Yeung wrote: This patch fixes a similar situation that occurs with the use_device clause, where the lowering would result in a null dereference if applied to a non-present optional argument. This patch builds a conditional check that skips the dereference if

Re: [PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause

2019-07-29 Thread Kwok Cheung Yeung
On 12/07/2019 12:41 pm, Jakub Jelinek wrote: +/* Return true if DECL is a Fortran optional argument. */ + +bool +omp_is_optional_argument (tree decl) +{ + /* A passed-by-reference Fortran optional argument is similar to + a normal argument, but since it can be null the type is a + POINT

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

2019-07-29 Thread Jozef Lawrynowicz
On Wed, 24 Jul 2019 09:31:11 -0600 Jeff Law wrote: > On 7/23/19 7:22 AM, Jozef Lawrynowicz wrote: > > > > gcc/ChangeLog: > > > > 2019-07-23 Jozef Lawrynowicz > > > > * config/msp430/msp430.h (DRIVER_SELF_SPECS): Define and emit errors > > when -m{code,data}-region are used without -

Re: Ping agian: [PATCH V2] Loop split upon semi-invariant condition (PR tree-optimization/89134)

2019-07-29 Thread Michael Matz
Hello Feng, first, sorry for the terrible delay in reviewing, but here is one now :) Generally I do like the idea of the transformation, and the basic building blocks seem to be sound. But I dislike it being a separate pass, so please integrate the code you have written into the existing loop

Re: [PATCH], PowerPC #11, Add DS offset mode to rs6000.c's reg_addr

2019-07-29 Thread Segher Boessenkool
Please send patch series as patch series. It is almost impossible to keep track of a patch series as unrelated emails, even worse than the other way around. Please keep subjects to about 50 chars max., distinguishable in the first 30 or so chars, so that patches can actually be found in mail clie

[PATCH][ARM] Switch to default sched pressure algorithm

2019-07-29 Thread Wilco Dijkstra
Currently the Arm backend selects the alternative sched pressure algorithm. The issue is that this doesn't take register pressure into account, and so it causes significant additional spilling on Arm where there are only 14 allocatable registers. SPEC2006 shows significant codesize reduction with

Re: [PATCH] Builtin function roundeven folding implementation

2019-07-29 Thread Martin Jambor
Hi Joseph, can you please have look at this patch from Tejas, whether it is perhaps ready to be committed to trunk or what things still need to be addressed? Thanks a lot, Martin On Fri, Jun 28 2019, Tejas Joshi wrote: > Hi. > This patch includes implementation of new function roundeven along

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

2019-07-29 Thread Jakub Jelinek
On Wed, Jul 24, 2019 at 12:07:36PM -0600, Martin Sebor wrote: > > > There are a number of existing instances of setting TREE_NO_WARNING > > > to suppress -Wuninitialized, and some are the cause of known problems. > > > Bugs 51545, 58950, 74762, 74765 or 89697 are examples.  They all boil > > > down

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

2019-07-29 Thread Jakub Jelinek
On Tue, Jul 23, 2019 at 04:26:24AM +, JiangNing OS wrote: > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,9 @@ > +2019-07-22 Jiangning Liu > + > + PR middle-end/91195 > + * tree-ssa-phiopt.c (cond_store_replacement): Work around > + -Wmaybe-uninitialized warning. > + >

[PATCH][arm][committed] Make ACLE builtins use arm_* namespace for expanders

2019-07-29 Thread Kyrill Tkachov
Hi all, The builtins from use fairly general expander names such as "crc", "mcr" etc. These run the risk of being reserved by the midend in the future. Let's namespace them to arm_* as is convention. Bootstrapped and tested on arm-none-linux-gnueabihf. Committing to trunk. Thanks, Kyrill 20

Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows

2019-07-29 Thread Liu Hao
在 2019/7/29 22:43, JonY 写道: > > Any updates? > No. I am still under the impression that using thread handles as `std::thread::id`s: 0) complexifies comparison of thread IDs without obvious benefits, and 1) does not work reliably because handles can be duplicated, and 2) makes `__gthread_self()`

Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows

2019-07-29 Thread JonY
On 7/3/19 12:55 PM, Liu Hao wrote: > 在 2019/7/2 下午8:27, Jonathan Wakely 写道: >> >> What do you mean by "unclosed thread"? If I read it correctly, the MSDN >> page >> refers to closing a handle (which makes sense), not closing a thread. >> > > Yes, it meant a thread which has terminated but not dele

[PATCH] Improve PTA for PR91257, new bitmap_ior_into_and_free

2019-07-29 Thread Richard Biener
The following patch addresses appearant quadraticness in PTAs SCC merging algorithm which does (simplified) for (node N in SCC) bitmap_ior_into (pred(leader), pred(N)); with the linked list implementation this leads to increasingly large amount of walking for pred(leader). The patch change

Re: [PATCH] Remove also 2nd argument for unused delete operator (PR tree-optimization/91270).

2019-07-29 Thread Richard Biener
On Mon, Jul 29, 2019 at 12:37 PM Martin Liška wrote: > > On 7/29/19 11:59 AM, Richard Biener wrote: > > On Sun, Jul 28, 2019 at 4:57 PM Martin Liška wrote: > >> > >> Hi. > >> > >> And there's one more patch that deals with delete operator > >> which has a second argument (size). That definition G

[PATCH] PR libstdc++/51333 Define recursive_init_error constructor non-inline

2019-07-29 Thread Jonathan Wakely
The recursive_init_error class is defined in a header, with an inline constructor, but the definition of the vtable and destructor are not exported from the shared library. With -fkeep-inline-functions the constructor gets emitted in user code, and requires the (non-exported) vtable. This fails to

Re: Fix inchash handling of wide_ints (PR91242)

2019-07-29 Thread Richard Biener
On Mon, Jul 29, 2019 at 3:06 PM Richard Sandiford wrote: > > Richard Sandiford writes: > > Richard Biener writes: > >> On Mon, Jul 29, 2019 at 11:11 AM Richard Sandiford > >> wrote: > >>> > >>> inchash::hash::add_wide_int operated directly on the raw encoding > >>> of the wide_int, including an

Re: [PATCH] Do not emit __gnu_lto_v1 symbol.

2019-07-29 Thread Georg-Johann Lay
Hi Martin. In SVN r273662 you changed a comment in avr.c from __gnu_lto_v1 to __gnu_lto_slim without changing the relevant code: /* __gnu_lto_slim is just a marker for the linker injected by toplev.c. There is no need to trigger __do_clear_bss code for them. */ if (!STR_PREFIX_P (na

[PATCH] Provide proper error message for -flto=abcd.

2019-07-29 Thread Martin Liška
Hi. The patch is about proper error message for situations where user give a wrong argument to -flto option. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2019-07-29 Martin Liska * opts.c (common_handle_o

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

2019-07-29 Thread Martin Liška
Hi. I'm sending v2 of the patch that can newly auto-detect make jobserver and use it. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From df747a46241dcdb8ad055071f9e0605c9f469268 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue

Re: Fix inchash handling of wide_ints (PR91242)

2019-07-29 Thread Richard Sandiford
Richard Sandiford writes: > Richard Biener writes: >> On Mon, Jul 29, 2019 at 11:11 AM Richard Sandiford >> wrote: >>> >>> inchash::hash::add_wide_int operated directly on the raw encoding >>> of the wide_int, including any redundant upper bits. The problem >>> with that is that the upper bits

[PATCH] Improve RPO VN for PR91257

2019-07-29 Thread Richard Biener
The following patch addresses a known issue with managing availability in RPO VN - this is just the first time a testcase actually shows measurable cycles here. It's hammering libc malloc/free for allocating one-element vectors. So the following finally goes the way the comment suggests and hoo

[PATCH] Improve PR91257

2019-07-29 Thread Richard Biener
The following significantly brings down compile-time spent in VRP for the testcase. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-07-29 Richard Biener PR tree-optimization/91257 * tree-vrp.c (operand_less_p): Avoid dispatching to fold

Re: Fix inchash handling of wide_ints (PR91242)

2019-07-29 Thread Richard Sandiford
Richard Biener writes: > On Mon, Jul 29, 2019 at 11:11 AM Richard Sandiford > wrote: >> >> inchash::hash::add_wide_int operated directly on the raw encoding >> of the wide_int, including any redundant upper bits. The problem >> with that is that the upper bits are only defined for some wide-int

Re: [PATCH] Remove also 2nd argument for unused delete operator (PR tree-optimization/91270).

2019-07-29 Thread Martin Liška
On 7/29/19 11:59 AM, Richard Biener wrote: > On Sun, Jul 28, 2019 at 4:57 PM Martin Liška wrote: >> >> Hi. >> >> And there's one more patch that deals with delete operator >> which has a second argument (size). That definition GIMPLE >> statement of the size must be also properly marked. >> >> Pat

Re: Add ARRAY_REF based access patch disambiguation

2019-07-29 Thread Jan Hubicka
Hello, I missed your email initially, so sorry for late reaction. > > +/* REF1 and REF2 are ARRAY_REFs which either start at the same address or > > + are completely disjoint. > > So the ARRAY_REF array bases are at the same address, not the ARRAY_REF > itself? Yes, updated the comment. > > >

[PATCH] Fix PR91267

2019-07-29 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-07-29 Richard Biener PR tree-optimization/91267 * vr-values.c (vr_values::update_value_range): Add early return for effectively VARYING lattice entry. * gcc.dg/torture/pr91267.c: New

Re: Fix inchash handling of wide_ints (PR91242)

2019-07-29 Thread Richard Biener
On Mon, Jul 29, 2019 at 11:11 AM Richard Sandiford wrote: > > inchash::hash::add_wide_int operated directly on the raw encoding > of the wide_int, including any redundant upper bits. The problem > with that is that the upper bits are only defined for some wide-int > storage types (including wide_

Re: [PATCH] Remove also 2nd argument for unused delete operator (PR tree-optimization/91270).

2019-07-29 Thread Richard Biener
On Sun, Jul 28, 2019 at 4:57 PM Martin Liška wrote: > > Hi. > > And there's one more patch that deals with delete operator > which has a second argument (size). That definition GIMPLE > statement of the size must be also properly marked. > > Patch can bootstrap on x86_64-linux-gnu and survives reg

Re: [PATCH 1/2] Come up with function_decl_type and use it in tree_function_decl.

2019-07-29 Thread Richard Biener
On Thu, Jul 25, 2019 at 5:27 PM Martin Liška wrote: > > On 7/25/19 3:30 PM, Martin Liška wrote: > > On 7/25/19 2:18 PM, Marc Glisse wrote: > >> On Thu, 25 Jul 2019, Martin Liška wrote: > >> > DCE has special code to avoid removing the LHS of malloc when it is > unused. Is there somethin

Fix inchash handling of wide_ints (PR91242)

2019-07-29 Thread Richard Sandiford
inchash::hash::add_wide_int operated directly on the raw encoding of the wide_int, including any redundant upper bits. The problem with that is that the upper bits are only defined for some wide-int storage types (including wide_int itself). wi::to_wide(tree) instead returns a value that is exten

Re: Prevent tree-ssa-dce.c from deleting stores at -Og

2019-07-29 Thread Richard Sandiford
Jeff Law writes: > On 7/7/19 3:45 AM, Richard Sandiford wrote: >> DCE tries to delete dead stores to local data and also tries to insert >> debug binds for simple cases: >> >> /* If this is a store into a variable that is being optimized away, >> add a debug bind stmt if possible. */ >>

Avoid ICE compiling cactusBSSN

2019-07-29 Thread Jan Hubicka
Hi, this patch fixes ICE when we output ODR violation warning compiling cactusBSSN. As indicated in PR, i think the warning is wrong and we need to teach C++ FE to not consider the type in question as anonymous namespace. Regtested x86_64-linux. Comitted as obvious. PR lto/91222 *