OSDN Git Service

* fixed-value.h: New file.
[pf3gnuchains/gcc-fork.git] / gcc / df-scan.c
index 61147be..76f85c1 100644 (file)
@@ -10,7 +10,7 @@ This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -19,10 +19,8 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.
-*/
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -433,7 +431,7 @@ static struct df_problem problem_SCAN =
   df_scan_start_block,        /* Debugging start block.  */
   NULL,                       /* Debugging end block.  */
   NULL,                       /* Incremental solution verify start.  */
-  NULL,                       /* Incremental solution verfiy end.  */
+  NULL,                       /* Incremental solution verify end.  */
   NULL,                       /* Dependent problem.  */
   TV_DF_SCAN,                 /* Timing variable.  */
   false                       /* Reset blocks on dropping out of blocks_to_analyze.  */
@@ -2148,8 +2146,8 @@ df_ref_equal_p (struct df_ref *ref1, struct df_ref *ref2)
 static int
 df_ref_compare (const void *r1, const void *r2)
 {
-  const struct df_ref *ref1 = *(struct df_ref **)r1;
-  const struct df_ref *ref2 = *(struct df_ref **)r2;
+  const struct df_ref *const ref1 = *(const struct df_ref *const*)r1;
+  const struct df_ref *const ref2 = *(const struct df_ref *const*)r2;
 
   if (ref1 == ref2)
     return 0;
@@ -2265,8 +2263,8 @@ df_mw_equal_p (struct df_mw_hardreg *mw1, struct df_mw_hardreg *mw2)
 static int
 df_mw_compare (const void *m1, const void *m2)
 {
-  const struct df_mw_hardreg *mw1 = *(struct df_mw_hardreg **)m1;
-  const struct df_mw_hardreg *mw2 = *(struct df_mw_hardreg **)m2;
+  const struct df_mw_hardreg *const mw1 = *(const struct df_mw_hardreg *const*)m1;
+  const struct df_mw_hardreg *const mw2 = *(const struct df_mw_hardreg *const*)m2;
 
   if (mw1 == mw2)
     return 0;
@@ -2627,7 +2625,6 @@ df_ref_record (struct df_collection_rec *collection_rec,
               enum df_ref_type ref_type, 
               enum df_ref_flags ref_flags) 
 {
-  rtx oldreg = reg;
   unsigned int regno;
 
   gcc_assert (REG_P (reg) || GET_CODE (reg) == SUBREG);
@@ -2658,7 +2655,7 @@ df_ref_record (struct df_collection_rec *collection_rec,
        {
          /* Sets to a subreg of a multiword register are partial. 
             Sets to a non-subreg of a multiword register are not.  */
-         if (GET_CODE (oldreg) == SUBREG)
+         if (GET_CODE (reg) == SUBREG)
            ref_flags |= DF_REF_PARTIAL;
          ref_flags |= DF_REF_MW_HARDREG;
 
@@ -2666,7 +2663,6 @@ df_ref_record (struct df_collection_rec *collection_rec,
          hardreg->type = ref_type;
          hardreg->flags = ref_flags;
          hardreg->mw_reg = reg;
-         hardreg->loc = loc;
          hardreg->start_regno = regno;
          hardreg->end_regno = endregno - 1;
          hardreg->mw_order = df->ref_order++;
@@ -2763,6 +2759,12 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
       || (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))))
     df_ref_record (collection_rec, 
                    dst, loc, bb, insn, DF_REF_REG_DEF, flags);
+
+  /* We want to keep sp alive everywhere - by making all
+     writes to sp also use of sp. */
+  if (REG_P (dst) && REGNO (dst) == STACK_POINTER_REGNUM)
+    df_ref_record (collection_rec,
+               dst, NULL, bb, insn, DF_REF_REG_USE, flags);
 }
 
 
@@ -3426,7 +3428,7 @@ df_get_eh_block_artificial_uses (bitmap eh_block_artificial_uses)
 {
   bitmap_clear (eh_block_artificial_uses);
 
-  /* The following code (down thru the arg_pointer seting APPEARS
+  /* The following code (down thru the arg_pointer setting APPEARS
      to be necessary because there is nothing that actually
      describes what the exception handling code may actually need
      to keep alive.  */
@@ -4263,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.  */