Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-15 Thread Richard Biener
On Thu, Aug 15, 2019 at 12:47 PM Martin Liška wrote: > > PING^1 OK > On 8/8/19 10:43 AM, Martin Liška wrote: > > On 8/7/19 4:12 PM, Richard Biener wrote: > >> On Wed, Aug 7, 2019 at 2:04 PM Martin Liška wrote: > >>> > >>> On 8/7/19 12:51 PM, Jakub Jelinek wrote: > On Wed, Aug 07, 2019 at 1

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-15 Thread Martin Liška
PING^1 On 8/8/19 10:43 AM, Martin Liška wrote: > On 8/7/19 4:12 PM, Richard Biener wrote: >> On Wed, Aug 7, 2019 at 2:04 PM Martin Liška wrote: >>> >>> On 8/7/19 12:51 PM, Jakub Jelinek wrote: On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: > On 8/7/19 11:51 AM, Richard Bie

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-08 Thread Martin Liška
On 8/7/19 4:12 PM, Richard Biener wrote: > On Wed, Aug 7, 2019 at 2:04 PM Martin Liška wrote: >> >> On 8/7/19 12:51 PM, Jakub Jelinek wrote: >>> On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: On 8/7/19 11:51 AM, Richard Biener wrote: > I think the simplest way to achieve th

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-07 Thread Richard Biener
On Wed, Aug 7, 2019 at 2:04 PM Martin Liška wrote: > > On 8/7/19 12:51 PM, Jakub Jelinek wrote: > > On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: > >> On 8/7/19 11:51 AM, Richard Biener wrote: > >>> I think the simplest way to achieve this is to not copy, aka clear, > >>> DECL_IS_O

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-07 Thread Martin Liška
On 8/7/19 12:51 PM, Jakub Jelinek wrote: > On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: >> On 8/7/19 11:51 AM, Richard Biener wrote: >>> I think the simplest way to achieve this is to not copy, aka clear, >>> DECL_IS_OPERATOR_* when cloning and removing arguments >>> (cloning for a

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-07 Thread Jakub Jelinek
On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: > On 8/7/19 11:51 AM, Richard Biener wrote: > > I think the simplest way to achieve this is to not copy, aka clear, > > DECL_IS_OPERATOR_* when cloning and removing arguments > > (cloning for a constant align argument should be OK for ex

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-07 Thread Martin Liška
On 8/7/19 11:51 AM, Richard Biener wrote: > I think the simplest way to achieve this is to not copy, aka clear, > DECL_IS_OPERATOR_* when cloning and removing arguments > (cloning for a constant align argument should be OK for example, as is > for a constant address). Or simply always when cloning

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-07 Thread Richard Biener
On Tue, Aug 6, 2019 at 2:42 PM Martin Liška wrote: > > On 8/5/19 3:46 PM, Marc Glisse wrote: > > On Mon, 5 Aug 2019, Martin Liška wrote: > > > >> You are right. It can really lead to confusion of the DCE. > >> > >> What we have is DECL_ABSTRACT_ORIGIN(decl) which we can use to indicate > >> opera

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-06 Thread Martin Liška
On 8/5/19 3:46 PM, Marc Glisse wrote: > On Mon, 5 Aug 2019, Martin Liška wrote: > >> You are right. It can really lead to confusion of the DCE. >> >> What we have is DECL_ABSTRACT_ORIGIN(decl) which we can use to indicate >> operators >> that were somehow modified by an IPA optimization. > > Loo

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Marc Glisse
On Mon, 5 Aug 2019, Martin Liška wrote: You are right. It can really lead to confusion of the DCE. What we have is DECL_ABSTRACT_ORIGIN(decl) which we can use to indicate operators that were somehow modified by an IPA optimization. Looks similar to the cgraph_node->clone_of that Richard was

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Martin Liška
On 8/5/19 1:57 PM, Marc Glisse wrote: > On Mon, 5 Aug 2019, Martin Liška wrote: > >> On 8/5/19 9:07 AM, Marc Glisse wrote: >>> On Mon, 5 Aug 2019, Martin Liška wrote: >>> I'm sending fix for the ICE. The issue is that we can end up with a ctor without an argument (when not being used). >

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Richard Biener
On Mon, Aug 5, 2019 at 8:44 AM Martin Liška wrote: > > On 8/2/19 11:34 PM, H.J. Lu wrote: > > On Tue, Jul 2, 2019 at 4:50 AM Martin Liška wrote: > >> > >> Second part. > >> > >> Martin > > > > This caused: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91334 > > > > Hi. > > I'm sending fix

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Marc Glisse
On Mon, 5 Aug 2019, Martin Liška wrote: On 8/5/19 9:07 AM, Marc Glisse wrote: On Mon, 5 Aug 2019, Martin Liška wrote: I'm sending fix for the ICE. The issue is that we can end up with a ctor without an argument (when not being used). Ah, I didn't realize that after cloning and drastically c

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Martin Liška
On 8/5/19 9:07 AM, Marc Glisse wrote: > On Mon, 5 Aug 2019, Martin Liška wrote: > >> I'm sending fix for the ICE. The issue is that we can end up >> with a ctor without an argument (when not being used). > > Ah, I didn't realize that after cloning and drastically changing the > signature it woul

Re: [PATCH] Handle new operators with no arguments in DCE.

2019-08-05 Thread Marc Glisse
On Mon, 5 Aug 2019, Martin Liška wrote: I'm sending fix for the ICE. The issue is that we can end up with a ctor without an argument (when not being used). Ah, I didn't realize that after cloning and drastically changing the signature it would still count as operator new/delete. Is getting do

[PATCH] Handle new operators with no arguments in DCE.

2019-08-04 Thread Martin Liška
:55:45 +0200 Subject: [PATCH] Handle new operators with no arguments in DCE. gcc/ChangeLog: 2019-08-05 Martin Liska PR c++/91334 * tree-ssa-dce.c (propagate_necessity): Handle new operators with not arguments. (eliminate_unnecessary_stmts): Likewise. gcc/testsuite/ChangeLog: 2019-08-0