Re: Improve DSE in the presence of calls

2011-06-20 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/18/11 03:10, Ramana Radhakrishnan wrote: > This seems to have triggered > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49452 > > on arm-linux-gnueabi > > Might well be a DUP of PR49429 but I haven't looked at it yet. It is effectively a dupli

Re: Improve DSE in the presence of calls

2011-06-20 Thread Richard Guenther
On Sat, Jun 18, 2011 at 9:03 PM, Easwaran Raman wrote: > The gimple for test2_31 before RTL expansion contains: > >  # .MEMD.2034_2 = VDEF <.MEMD.2034_1(D)> >  s1D.2035 = s1D.1255; > > The RHS is a PARM_DECL. It doesn't have TREE_ADDRESSABLE and the LHS > has, which makes sense. But then the move

Re: Improve DSE in the presence of calls

2011-06-18 Thread Easwaran Raman
The gimple for test2_31 before RTL expansion contains: # .MEMD.2034_2 = VDEF <.MEMD.2034_1(D)> s1D.2035 = s1D.1255; The RHS is a PARM_DECL. It doesn't have TREE_ADDRESSABLE and the LHS has, which makes sense. But then the move is translated to memcpy but the src memory location is still consi

Re: Improve DSE in the presence of calls

2011-06-18 Thread Ramana Radhakrishnan
This seems to have triggered http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49452 on arm-linux-gnueabi Might well be a DUP of PR49429 but I haven't looked at it yet. cheers Ramana

Re: Improve DSE in the presence of calls

2011-06-17 Thread Easwaran Raman
This patch seems to break ia64 and some other targets. I have updated Bug 49429 with a test case triage. It looks like for some EXPR, may_be_aliased returns incorrect value and hence can_escape incorrectly concludes the variable can't escape resulting in removal of useful stores. (So can_escape()

Re: Improve DSE in the presence of calls

2011-06-15 Thread Easwaran Raman
On Tue, Jun 14, 2011 at 5:47 PM, H.J. Lu wrote: > On Tue, May 10, 2011 at 12:18 PM, Easwaran Raman wrote: >> On Tue, May 3, 2011 at 9:40 AM, Easwaran Raman wrote: >>> On Mon, May 2, 2011 at 8:37 PM, Jeff Law wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/26/11 16

Re: Improve DSE in the presence of calls

2011-06-14 Thread H.J. Lu
On Tue, May 10, 2011 at 12:18 PM, Easwaran Raman wrote: > On Tue, May 3, 2011 at 9:40 AM, Easwaran Raman wrote: >> On Mon, May 2, 2011 at 8:37 PM, Jeff Law wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 04/26/11 16:06, Easwaran Raman wrote: >>> > You're right. T

Re: Improve DSE in the presence of calls

2011-06-14 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/11 13:18, Easwaran Raman wrote: >>> I am not sure I understand the problem here. If there is a wild read >>> from asm, the instruction has the wild_read flag set. The if statement >>> checks if that flag is set and if so it clears the bitmap

Re: Ping: Re: Improve DSE in the presence of calls

2011-06-07 Thread Xinliang David Li
On Tue, Jun 7, 2011 at 10:11 AM, Easwaran Raman wrote: > Ping. > > Diego, David, >  Is this patch OK for google/main? Yes -- but I would like to see it in trunk too if possible -- both llvm and icc do very good job in these cases. Thanks, David > > -Easwaran > > On Thu, Jun 2, 2011 at 4:48 PM,

Re: Ping: Re: Improve DSE in the presence of calls

2011-06-07 Thread Easwaran Raman
Ping. Diego, David, Is this patch OK for google/main? -Easwaran On Thu, Jun 2, 2011 at 4:48 PM, Easwaran Raman wrote: > Ping. > > On Sat, May 14, 2011 at 8:01 AM, Easwaran Raman wrote: >> http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00781.html >> >

Re: Ping: Re: Improve DSE in the presence of calls

2011-06-02 Thread Easwaran Raman
Ping. On Sat, May 14, 2011 at 8:01 AM, Easwaran Raman wrote: > http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00781.html >

Re: Ping: Re: Improve DSE in the presence of calls

2011-05-20 Thread Easwaran Raman
Ping. On Sat, May 14, 2011 at 8:01 AM, Easwaran Raman wrote: > http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00781.html >

Ping: Re: Improve DSE in the presence of calls

2011-05-14 Thread Easwaran Raman
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00781.html

Re: Improve DSE in the presence of calls

2011-05-10 Thread Easwaran Raman
On Tue, May 3, 2011 at 9:40 AM, Easwaran Raman wrote: > On Mon, May 2, 2011 at 8:37 PM, Jeff Law wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 04/26/11 16:06, Easwaran Raman wrote: >> >>> You're right. The patch has correctness issues. It is not possible to simply

Re: Improve DSE in the presence of calls

2011-05-03 Thread Easwaran Raman
On Mon, May 2, 2011 at 8:37 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/26/11 16:06, Easwaran Raman wrote: > >> >>> You're right. The patch has correctness issues. It is not possible to >>> simply not call add_wild_read because it also resets >>> active_local_st

Re: Improve DSE in the presence of calls

2011-05-03 Thread Richard Guenther
On Tue, May 3, 2011 at 5:37 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/26/11 16:06, Easwaran Raman wrote: > >> >>> You're right. The patch has correctness issues. It is not possible to >>> simply not call add_wild_read because it also resets >>> active_local_st

Re: Improve DSE in the presence of calls

2011-05-02 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/26/11 16:06, Easwaran Raman wrote: > >> You're right. The patch has correctness issues. It is not possible to >> simply not call add_wild_read because it also resets >> active_local_stores and frees read_recs. During the local phase it >> seems

Re: Improve DSE in the presence of calls

2011-04-26 Thread Easwaran Raman
On Mon, Apr 25, 2011 at 10:03 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/22/11 14:19, Easwaran Raman wrote: >> Hi, >>  This patch improves RTL DSE by not assuming that calls read all >> memory locations. With this patch, calls are assumed to read any >> non-fra

Re: Improve DSE in the presence of calls

2011-04-25 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/22/11 14:19, Easwaran Raman wrote: > Hi, > This patch improves RTL DSE by not assuming that calls read all > memory locations. With this patch, calls are assumed to read any > non-frame memory and any stack variables that can potentially escape.

Re: Improve DSE in the presence of calls

2011-04-22 Thread Easwaran Raman
On Fri, Apr 22, 2011 at 1:26 PM, Jakub Jelinek wrote: > On Fri, Apr 22, 2011 at 01:19:17PM -0700, Easwaran Raman wrote: > > The ChangeLog entry has various issues: > >> 2011-04-22  Easwaran Raman   >> >> PR rtl-optimization/44194 > > This should have tab before PR as well. > >>       * dse.c (head

Re: Improve DSE in the presence of calls

2011-04-22 Thread Jakub Jelinek
On Fri, Apr 22, 2011 at 01:19:17PM -0700, Easwaran Raman wrote: The ChangeLog entry has various issues: > 2011-04-22 Easwaran Raman > > PR rtl-optimization/44194 This should have tab before PR as well. > * dse.c (header files): Include tree-flow.h. This should be just * dse.c

Improve DSE in the presence of calls

2011-04-22 Thread Easwaran Raman
Hi, This patch improves RTL DSE by not assuming that calls read all memory locations. With this patch, calls are assumed to read any non-frame memory and any stack variables that can potentially escape. This patch partly addresses PR rtl-optimization/44194. Bootstraps and no test regressions. OK f