Re: query regarding adding a pass to undo final value replacement.

2008-10-15 Thread Ramana Radhakrishnan
On Wed, Oct 15, 2008 at 8:37 AM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > >> > but you only take the hash of the argument of the phi node (i.e., the >> > ssa name), not the computations on that it is based >> >> Is this something like what you had in mind ? >> >> gen_hash (stmt) >> { >> >>

Re: query regarding adding a pass to undo final value replacement.

2008-10-15 Thread Zdenek Dvorak
Hi, > > but you only take the hash of the argument of the phi node (i.e., the > > ssa name), not the computations on that it is based > > Is this something like what you had in mind ? > > gen_hash (stmt) > { > > if (stmt == NULL) > return 0; > > use_operand_p use_p; > ssa_op_

Re: query regarding adding a pass to undo final value replacement.

2008-10-14 Thread Ramana Radhakrishnan
On Tue, Oct 14, 2008 at 9:14 AM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > >> >> >> So if the ssa_names are infact reused they won't be the same >> >> >> computations. >> >> > >> >> > do you also check this for ssa names inside the loop (in your example, >> >> > D.10_1? >> >> >> >> If we hav

Re: query regarding adding a pass to undo final value replacement.

2008-10-14 Thread Zdenek Dvorak
Hi, > >> >> So if the ssa_names are infact reused they won't be the same > >> >> computations. > >> > > >> > do you also check this for ssa names inside the loop (in your example, > >> > D.10_1? > >> > >> If we have to reinsert for a = phi (B) . We do the following checks. > >> > >> 1. If the edge

Re: query regarding adding a pass to undo final value replacement.

2008-10-13 Thread Ramana Radhakrishnan
Hi, >> >> >> So if the ssa_names are infact reused they won't be the same >> >> computations. >> > >> > do you also check this for ssa names inside the loop (in your example, >> > D.10_1? >> >> If we have to reinsert for a = phi (B) . We do the following checks. >> >> 1. If the edge information in

Re: query regarding adding a pass to undo final value replacement.

2008-10-13 Thread Zdenek Dvorak
Hi, > [Sorry about dropping the ball on this. I've had some trouble with > internet connectivity and was on vacation for a few days. ] > > On Thu, Oct 2, 2008 at 2:56 AM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > > Hi, > > > >> >> b) If any PHI node has count zero it can be inserted back

Re: query regarding adding a pass to undo final value replacement.

2008-10-13 Thread Ramana Radhakrishnan
Hi Zdenek, [Sorry about dropping the ball on this. I've had some trouble with internet connectivity and was on vacation for a few days. ] On Thu, Oct 2, 2008 at 2:56 AM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > >> >> b) If any PHI node has count zero it can be inserted back and its

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Zdenek Dvorak
Hi, > > I would disagree on that. Whether a final value replacement is > > profitable or not largely depends on whether it makes further > > optimization of the loop possible or not; this makes it difficult > > to find a good cost model. I think undoing FVR is a good approach > > to solve this p

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Zdenek Dvorak
Hi, > >> b) If any PHI node has count zero it can be inserted back and its > >> corresponding computations removed, iff the argument of the PHI > >> node > >> still exists as an SSA variable. This means that we can insert > >> a_1 = PHI if D.10_1 still exists and hasnt b

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Richard Guenther
On Wed, Oct 1, 2008 at 6:22 PM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > >> > Based on the conversation in the thread at >> > http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've tried to get a >> > pass trying to undo final value replacement going. The initial >> > implementation was do

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Ramana Radhakrishnan
Hi Zdenek, On Wed, Oct 1, 2008 at 5:19 PM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > >> b) If any PHI node has count zero it can be inserted back and its >> corresponding computations removed, iff the argument of the PHI node >> still exists as an SSA variable. This mea

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Zdenek Dvorak
Hi, > On Wed, Oct 1, 2008 at 3:59 PM, Richard Guenther > <[EMAIL PROTECTED]> wrote: > > On Wed, Oct 1, 2008 at 3:22 PM, Ramana Radhakrishnan <[EMAIL PROTECTED]> > > wrote: > >> Hi , > >> > >> Based on the conversation in the thread at > >> http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've t

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Zdenek Dvorak
Hi, > > Based on the conversation in the thread at > > http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've tried to get a > > pass trying to undo final value replacement going. The initial > > implementation was done by Pranav Bhandarkar when he was employed at > > Azingo as part of work spons

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Zdenek Dvorak
Hi, > b) If any PHI node has count zero it can be inserted back and its > corresponding computations removed, iff the argument of the PHI node > still exists as an SSA variable. This means that we can insert > a_1 = PHI if D.10_1 still exists and hasnt been removed by >

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Richard Guenther
On Wed, Oct 1, 2008 at 3:59 PM, Richard Guenther <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 3:22 PM, Ramana Radhakrishnan <[EMAIL PROTECTED]> > wrote: >> Hi , >> >> Based on the conversation in the thread at >> http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've tried to get a >> pass

Re: query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Richard Guenther
On Wed, Oct 1, 2008 at 3:22 PM, Ramana Radhakrishnan <[EMAIL PROTECTED]> wrote: > Hi , > > Based on the conversation in the thread at > http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've tried to get a > pass trying to undo final value replacement going. The initial > implementation was done b

query regarding adding a pass to undo final value replacement.

2008-10-01 Thread Ramana Radhakrishnan
Hi , Based on the conversation in the thread at http://gcc.gnu.org/ml/gcc/2008-03/msg00513.html , we've tried to get a pass trying to undo final value replacement going. The initial implementation was done by Pranav Bhandarkar when he was employed at Azingo as part of work sponsored by Icera Semic