This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[patch, committed] for PR33224


Hello,

the way df works currently makes it possible for defs outside of the
analysed region to have the same id as the defs in the analysed region
(the defs in the analysed region are renumbered to consecutive
integers).  This means that we need to check whether a def belongs to
the analysed region before testing whether it belongs to a reaching def
set.

Bootstrapped & regtested on i686, commited.

Zdenek

	PR rtl-optimization/33224
	* loop-iv.c (latch_dominating_def): Check that the definition belongs
	to the analysed region.

Index: loop-iv.c
===================================================================
*** loop-iv.c	(revision 127935)
--- loop-iv.c	(working copy)
*************** latch_dominating_def (rtx reg, struct df
*** 301,307 ****
  
    for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = adef->next_reg)
      {
!       if (!bitmap_bit_p (bb_info->out, DF_REF_ID (adef)))
  	continue;
  
        /* More than one reaching definition.  */
--- 301,308 ----
  
    for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = adef->next_reg)
      {
!       if (!bitmap_bit_p (df->blocks_to_analyze, DF_REF_BB (adef)->index)
! 	  || !bitmap_bit_p (bb_info->out, DF_REF_ID (adef)))
  	continue;
  
        /* More than one reaching definition.  */


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