Re: How to handle loop iterator variable?

2008-05-19 Thread Sandeep Maram
Hi, My function is working properly for the below case - for (i = 1; i < N ; i++) { a[i] = 1; } for (i = 1; i < N ; i++) { j = a[i]; } But I am required to add additional phi node for j in the following case - for (i = 1; i < N ; i++) { a[i] = 1; }

Fwd: How to handle loop iterator variable?

2008-05-15 Thread Sandeep Maram
-- Forwarded message -- From: Sandeep Maram <[EMAIL PROTECTED]> Date: Thu, May 15, 2008 at 6:46 PM Subject: Re: How to handle loop iterator variable? To: Sebastian Pop <[EMAIL PROTECTED]> Cc: gcc@gcc.gnu.org > In lambda-code.c:1858 you have some code that does a s

Re: How to handle loop iterator variable?

2008-05-15 Thread Sandeep Maram
> In lambda-code.c:1858 you have some code that does a similar renaming: > > FOR_EACH_IMM_USE_STMT (stmt, imm_iter, oldiv_def) > FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter) >propagate_value (use_p, newiv); > > The function replace_uses_by() also does the same renaming and it is suitable in my c

How to handle loop iterator variable?

2008-05-09 Thread Sandeep Maram
Hi, Consider 2 for loops as given below. for (i = 1; i < N ; i++) { a[i] = 1; } for (i = 1; i < N ; i++) { j = j + a[i]; } Their corresponding GIMPLE code looks like. loop_2 (header = 6, latch = 7, niter = , upper_bound = 999, estimate = 999) { bb_6 (preds = {bb_

Re: Moving statements from one BB to other BB.

2008-04-18 Thread Sandeep Maram
Hi, Consider the 2 for loops given below. for (i = 0; i < N ; i++) { a[i]= 1; } for (i = 0; i < N ; i++) { j = j+a[i]; } The headers of these 2 loops are bb_3, bb_6 respectively. They are as follows. bb_3 (preds = {bb_4 bb_2 }, succs = {bb_4 bb_5 }) { : # a_

Re: Moving statements from one BB to other BB.

2008-04-17 Thread Sandeep Maram
On Thu, Apr 17, 2008 at 5:20 PM, Richard Guenther <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 17, 2008 at 1:35 PM, Sandeep Maram <[EMAIL PROTECTED]> wrote: > > > > On Tue, Apr 15, 2008 at 3:00 PM, Richard Guenther > > <[EMAIL PROTECTED]> wrote: >

Re: Moving statements from one BB to other BB.

2008-04-17 Thread Sandeep Maram
On Tue, Apr 15, 2008 at 3:00 PM, Richard Guenther <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 15, 2008 at 7:49 AM, Sandeep Maram <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 15, 2008 at 10:34 AM, Daniel Berlin <[EMAIL PROTECTED]> wrote: > > > To clarify what

Re: Moving statements from one BB to other BB.

2008-04-17 Thread Sandeep Maram
On Tue, Apr 15, 2008 at 11:40 PM, Diego Novillo <[EMAIL PROTECTED]> wrote: > > On 4/15/08 1:34 PM, Zdenek Dvorak wrote: > > > Hi, > > > > > > > > > > > > To clarify what Richard means, your assertion that "you have > updated > > > > > SSA information" is false. > > > > > If you had updated the S

Re: Moving statements from one BB to other BB.

2008-04-14 Thread Sandeep Maram
ndeep. > On Mon, Apr 14, 2008 at 7:10 AM, Richard Guenther > > <[EMAIL PROTECTED]> wrote: > > > > On Mon, Apr 14, 2008 at 12:54 PM, Sandeep Maram <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I have transferred all the statemen

Moving statements from one BB to other BB.

2008-04-14 Thread Sandeep Maram
Hi, I have transferred all the statements of one BB( header of one loop) to another BB. After that I have updated SSA information too. But I get this error- definition in block 6 does not dominate use in block 3 for SSA_NAME: i_25 in statement: # VUSE D.1189_10 = a[i_25]; loop.c:8: internal com

Re: Fusing two loops

2008-04-10 Thread Sandeep Maram
Hi Zdenek, Thanks. Sandeep. On Thu, Apr 10, 2008 at 7:29 PM, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > Hi, > > > The error is rectified. The bug is in the function that calls fuse_loops(). > > Now I am trying to transfer all the statements, using code - > > > > /* The following function fus

Re: Fusing two loops

2008-04-10 Thread Sandeep Maram
Hi, The error is rectified. The bug is in the function that calls fuse_loops(). Now I am trying to transfer all the statements, using code - /* The following function fuses two loops. */ void fuse_loops (struct loop *loop_a, struct loop *loop_b) { debug_loop (loop_a, 10); debug_loop (loop_b,

Fwd: Fusing two loops

2008-04-09 Thread Sandeep Maram
-- Forwarded message -- From: Sandeep Maram <[EMAIL PROTECTED]> Date: Thu, Apr 10, 2008 at 11:57 AM Subject: Re: Fusing two loops To: Zdenek Dvorak <[EMAIL PROTECTED]> Hi Zdenek, I have written this function /* The following function fuses two loops. */ void

Fusing two loops

2008-04-04 Thread Sandeep Maram
Hi, I am trying to fuse two loops in tree level. For that, I am trying to transfer statements in the header of one loop to the header of the other one. The code " http://rafb.net/p/fha0IG57.html " contains the 2 loops. After moving a statement from one BB to another BB, do I need to update any