This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix for df problems, and and an ifcvt improvement

On 04/24/2010 07:55 PM, Paolo Bonzini wrote:
>> Looking at that patch, I can't make sense of your comment for
>> df_simulate_initialize_forwards.  Clearly the artificial defs at the
>> top must be set, not cleared, in the set of live regs?
> In either case it won't be correct.  It will lack regs that are defined
> at the top, but whose definitions do not generate liveness (i.e. they
> are unused).
> In general you're right that passes prefer to have an
> *over*approximation of liveness, that is show some dead registers as
> alive.  However, fwprop instead prefers an underapproximation, since a
> register erroneously marked as dead could simply prevent propagation
> into some REG_EQUAL or REQ_EQUIV notes.  That's why I left the fat
> comment that sort-of explained the situation.
> Solutions include:
> 1) the attached partial reversal of r128957 (untested).  Then you'd just
> start iteration from DF_LR_TOP instead of DF_LR_IN.
> 2) making two more def/use bitmaps in df_lr_bb_local_compute that are
> the difference between top and out.  (i.e. copy use and def just before
> processing artificial refs at the top of the basic block).  Then make
> df_simulate_initialize_forwards compute TOP from OUT and these two. This
> would be more efficient

Do you mean DF_LIVE rather than DF_LR?  It seems to me that when forward
scanning, you'd want DF_LIVE?

In df_lr_bb_local_compute, isn't there more confusion about partial sets?

          /* If the def is to only part of the reg, it does
             not kill the other defs that reach here.  */
          if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL |
              unsigned int dregno = DF_REF_REGNO (def);
              bitmap_set_bit (bb_info->def, dregno);
              bitmap_clear_bit (bb_info->use, dregno);

Clearly, a partial or conditional set must also count as a use?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]