Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-24 Thread Martin Jambor
Hi, On Sat, Feb 22 2020, Feng Xue OS wrote: > It is a good solution. > OK, so I'd like to go with my patch as it hopefully keeps some of the predicates a tiny bit simpler. I have re-based the patch on today's trunk and amended function comments as necessary (which I forgot last week). The resul

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-21 Thread Feng Xue OS
It is a good solution. Thanks, Feng From: Martin Jambor Sent: Saturday, February 22, 2020 2:15 AM To: Feng Xue OS; Tamar Christina; Jan Hubicka; gcc-patches@gcc.gnu.org Cc: nd Subject: Re: [PATCH] Fix bug in recursiveness check for function to be cloned

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-21 Thread Martin Jambor
Hi, On Thu, Feb 20 2020, Feng Xue OS wrote: > This is a simpel and nice fix, but could suppress some CP opportunities for > self-recursive call. Using the test case as example, the first should be a > for-all-context clone, and the call "recur_fn (i, 1, depth + 1)" is replaced > with > a newly c

RE: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-20 Thread Tamar Christina
Hi Martin, > Honza, is it OK for trunk? Tamar, can you please double check it fixes > your problem with perlbench? > Thanks for working on this! Yes it does seem to fix the regression as well. Cheers, Tamar > Thanks, > > Martin > > > ipa-cp: Avoid wrongly gathering self-recursive edges (PR 93

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-19 Thread Feng Xue OS
This is a simpel and nice fix, but could suppress some CP opportunities for self-recursive call. Using the test case as example, the first should be a for-all-context clone, and the call "recur_fn (i, 1, depth + 1)" is replaced with a newly created recursive node. Thus, in the next round of CP it

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-19 Thread Martin Jambor
Hi, On Thu, Feb 13 2020, Feng Xue OS wrote: > I've submitted a bug tracker, > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93707. > > The root cause is that for a self-recursive function, a for-all-contexts > clone could generate > an edge whose callee is not the function. Therefore, to check wh

Ping: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-18 Thread Feng Xue OS
Thanks, Feng From: Tamar Christina Sent: Monday, February 17, 2020 4:44 PM To: Feng Xue OS; Martin Jambor; Jan Hubicka; gcc-patches@gcc.gnu.org Cc: nd Subject: RE: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707) Hi Feng

RE: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-17 Thread Tamar Christina
a ; gcc- > patc...@gcc.gnu.org > Cc: nd > Subject: [PATCH] Fix bug in recursiveness check for function to be cloned > (ipa/pr93707) > > I've submitted a bug tracker, > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93707. > > The root cause is that for a self-recursive functio

[PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-12 Thread Feng Xue OS
I've submitted a bug tracker, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93707. The root cause is that for a self-recursive function, a for-all-contexts clone could generate an edge whose callee is not the function. Therefore, to check whether an edge stands for a recursive call during clonin