---------- Forwarded message ----------
From: 袁立威 <[EMAIL PROTECTED]>
Date: Wed, Apr 16, 2008 at 6:03 PM
Subject: Re: A live analysis problem on gcc4.2.3
To: Eric Botcazou <[EMAIL PROTECTED]>


Yes, I'm talking about propagate one insn in flow.c. How I map live in
and live out, please see the code below.
I'm sorry that I don't quite understand what do you mean by "given
that flow.c doesn't use these but operates on a struct
propagate_block_info instead?"

 FOR_EACH_BB (cur_bb)
   {
     bb_live_in = cur_bb->il.rtl->global_live_at_start;
     bb_live_out = cur_bb->il.rtl->global_live_at_end;

     bitmap_copy (insn_live_out, bb_live_out);
     bitmap_copy (insn_live_in, insn_live_out);

     pbi = init_propagate_block_info (cur_bb, insn_live_in, NULL, NULL, flags);

     for (insn = BB_END (cur_bb); ; insn = prev)
     {
       fprintf(file, "current insn:\n");
       print_rtl_single(file, insn);
       fprintf(file, "before propagate, insn live in:\n");
       debug_bitmap_file (file, insn_live_in);
       fprintf(file, "before propagate, insn live out:\n");
       debug_bitmap_file (file, insn_live_out);

       prev = propagate_one_insn (pbi, insn);

       assert ( pbi->reg_live==insn_live_in );

       fprintf(file, "after propagate, insn live in:\n");
       debug_bitmap_file (file, insn_live_in);
       fprintf(file, "after propagate, insn live out:\n");
       debug_bitmap_file (file, insn_live_out);

       if (insn == BB_HEAD (cur_bb))
         break;

       bitmap_copy (insn_live_out, insn_live_in);
     }

     if (!bitmap_equal_p (insn_live_in, bb_live_in)){
       fprintf(file, "Not equal!!\n");
       fprintf(file, "insn live in:\n");
       debug_bitmap_file(file, insn_live_in);
       fprintf(file, "bb live in:\n");
       debug_bitmap_file(file, bb_live_in);
       assert(0);
     }

     free_propagate_block_info (pbi);

   }


On Wed, Apr 16, 2008 at 5:32 PM, Eric Botcazou <[EMAIL PROTECTED]> wrote:
> > I use propagate_one_insn to get the current insn's live in. But it
> > seems wrong when propagate.
> > Before propagate one insn, there is no reg111 in live out and current
> > insn def the reg111, how can reg111
> >
> > appear in live in after propagate???
> >
> > My flag to propagate is:
> >   flags = PROP_DEATH_NOTES;
> >   flags &= ~(PROP_SCAN_DEAD_CODE | PROP_SCAN_DEAD_STORES
> >
> >                | PROP_KILL_DEAD_CODE);
> >
> > This is the dump:
> >
> > current insn:
> > (insn/f 43 42 44 2 (set (reg/f:DI 111 r35)
> >         (reg/f:DI 12 r12)) -1 (nil)
> >     (nil))
>
> Are you talking about flow.c:propagate_one_insn?  If so, how do you map
> "live in" and "live out" exactly, given that flow.c doesn't use these
> but operates on a struct propagate_block_info instead?
>
> --
> Eric Botcazou
>

Reply via email to