df-scan.c (df_scan_verify): Remove artificial limit on the number of blocks for verif...
authorSeongbae Park <seongbae.park@gmail.com>
Mon, 30 Jul 2007 20:30:38 +0000 (20:30 +0000)
committerSeongbae Park <spark@gcc.gnu.org>
Mon, 30 Jul 2007 20:30:38 +0000 (20:30 +0000)
2007-07-30  Seongbae Park <seongbae.park@gmail.com>

* df-scan.c (df_scan_verify): Remove artificial limit on
the number of blocks for verification.
* df-problems.c (df_lr_bb_local_compute, df_simulate_find_defs,
df_simulate_defs): Avoid unnecessary insn checking for defs.

From-SVN: r127070

gcc/ChangeLog
gcc/df-problems.c
gcc/df-scan.c

index a67cc1ff5bd2e1a0a27fca2dad5440a629db87ca..5cd25a9b7a7bea8ea9d3202a28d2ac66f9e64632 100644 (file)
@@ -1,3 +1,10 @@
+2007-07-30  Seongbae Park <seongbae.park@gmail.com>
+
+       * df-scan.c (df_scan_verify): Remove artificial limit on
+       the number of blocks for verification.
+       * df-problems.c (df_lr_bb_local_compute, df_simulate_find_defs,
+       df_simulate_defs): Avoid unnecessary insn checking for defs.
+
 2007-07-29  Mark Mitchell  <mark@codesourcery.com>
 
        gcc/
index a9c42a65549892550790d66ebfc5de3c686d8766..b28fb16e1776111c8c168e535d2d9f6a4270e098 100644 (file)
@@ -1389,53 +1389,16 @@ df_lr_bb_local_compute (unsigned int bb_index)
       if (!INSN_P (insn))
        continue;       
 
-      if (CALL_P (insn))
+      for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
        {
-         for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
+         struct df_ref *def = *def_rec;
+         /* 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 | DF_REF_CONDITIONAL)))
            {
-             struct df_ref *def = *def_rec;
              unsigned int dregno = DF_REF_REGNO (def);
-             
-             if (DF_REF_FLAGS (def) & DF_REF_MUST_CLOBBER)
-               {
-                 if (dregno >= FIRST_PSEUDO_REGISTER
-                     || !(SIBLING_CALL_P (insn)
-                          && bitmap_bit_p (df->exit_block_uses, dregno)
-                          && !refers_to_regno_p (dregno, dregno+1,
-                                                 current_function_return_rtx,
-                                                 (rtx *)0)))
-                   {
-                     /* 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 | DF_REF_CONDITIONAL)))
-                       {
-                         bitmap_set_bit (bb_info->def, dregno);
-                         bitmap_clear_bit (bb_info->use, dregno);
-                       }
-                   }
-               }
-             else
-               /* This is the return value.  */
-               if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
-                 {
-                   bitmap_set_bit (bb_info->def, dregno);
-                   bitmap_clear_bit (bb_info->use, dregno);
-                 }
-           }
-       }
-      else
-       {
-         for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
-           {
-             struct df_ref *def = *def_rec;
-             /* 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 | DF_REF_CONDITIONAL)))
-               {
-                 unsigned int dregno = DF_REF_REGNO (def);
-                 bitmap_set_bit (bb_info->def, dregno);
-                 bitmap_clear_bit (bb_info->use, dregno);
-               }
+             bitmap_set_bit (bb_info->def, dregno);
+             bitmap_clear_bit (bb_info->use, dregno);
            }
        }
 
@@ -4218,44 +4181,13 @@ df_simulate_find_defs (rtx insn, bitmap defs)
   struct df_ref **def_rec;
   unsigned int uid = INSN_UID (insn);
 
-  if (CALL_P (insn))
+  for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
     {
-      for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
-       {
-         struct df_ref *def = *def_rec;
-         unsigned int dregno = DF_REF_REGNO (def);
-         
-         if (DF_REF_FLAGS (def) & DF_REF_MUST_CLOBBER)
-           {
-             if (dregno >= FIRST_PSEUDO_REGISTER
-                 || !(SIBLING_CALL_P (insn)
-                      && bitmap_bit_p (df->exit_block_uses, dregno)
-                      && !refers_to_regno_p (dregno, dregno+1,
-                                             current_function_return_rtx,
-                                             (rtx *)0)))
-               {
-                 /* 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 | DF_REF_CONDITIONAL)))
-                   bitmap_set_bit (defs, dregno);
-               }
-           }
-         else
-           /* This is the return value.  */
-           if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
-             bitmap_set_bit (defs, dregno);
-       }
-    }
-  else
-    {
-      for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
-       {
-         struct df_ref *def = *def_rec;
-         /* 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 | DF_REF_CONDITIONAL)))
-           bitmap_set_bit (defs, DF_REF_REGNO (def));
-       }
+      struct df_ref *def = *def_rec;
+      /* 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 | DF_REF_CONDITIONAL)))
+       bitmap_set_bit (defs, DF_REF_REGNO (def));
     }
 }
 
@@ -4268,46 +4200,15 @@ df_simulate_defs (rtx insn, bitmap live)
   struct df_ref **def_rec;
   unsigned int uid = INSN_UID (insn);
 
-  if (CALL_P (insn))
+  for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
     {
-      for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
-       {
-         struct df_ref *def = *def_rec;
-         unsigned int dregno = DF_REF_REGNO (def);
-         
-         if (DF_REF_FLAGS (def) & DF_REF_MUST_CLOBBER)
-           {
-             if (dregno >= FIRST_PSEUDO_REGISTER
-                 || !(SIBLING_CALL_P (insn)
-                      && bitmap_bit_p (df->exit_block_uses, dregno)
-                      && !refers_to_regno_p (dregno, dregno+1,
-                                             current_function_return_rtx,
-                                             (rtx *)0)))
-               {
-                 /* 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 | DF_REF_CONDITIONAL)))
-                   bitmap_clear_bit (live, dregno);
-               }
-           }
-         else
-           /* This is the return value.  */
-           if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
-             bitmap_clear_bit (live, dregno);
-       }
-    }
-  else
-    {
-      for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
-       {
-         struct df_ref *def = *def_rec;
-         unsigned int dregno = DF_REF_REGNO (def);
-  
-         /* 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 | DF_REF_CONDITIONAL)))
-           bitmap_clear_bit (live, dregno);
-       }
+      struct df_ref *def = *def_rec;
+      unsigned int dregno = DF_REF_REGNO (def);
+
+      /* 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 | DF_REF_CONDITIONAL)))
+       bitmap_clear_bit (live, dregno);
     }
 }  
 
index 6e622f8460daeaad063560c54fcd13d2eea4e949..76f85c142af6a1173abe614cda7cfd70dbd13e8d 100644 (file)
@@ -4265,12 +4265,6 @@ df_scan_verify (void)
   if (!df)
     return;
 
-  /* This is a hack, but a necessary one.  If you do not do this,
-     insn_attrtab can never be compiled in a bootstrap.  This
-     verification is just too expensive.  */
-  if (n_basic_blocks > 250)
-    return;
-
   /* Verification is a 4 step process. */
 
   /* (1) All of the refs are marked by going thru the reg chains.  */