OSDN Git Service

2006-03-31 Asher Langton <langton2@llnl.gov>
[pf3gnuchains/gcc-fork.git] / gcc / df-scan.c
index affc6df..1e1ed26 100644 (file)
@@ -219,7 +219,7 @@ df_scan_alloc (struct dataflow *dflow, bitmap blocks_to_rescan)
                         sizeof (struct df_scan_bb_info), 
                         block_size);
 
-  problem_data = xmalloc (sizeof (struct df_scan_problem_data));
+  problem_data = XNEW (struct df_scan_problem_data);
   dflow->problem_data = problem_data;
 
   problem_data->ref_pool 
@@ -453,7 +453,7 @@ df_rescan_blocks (struct df *df, bitmap blocks)
       for (i = df->num_problems_defined; i; i--)
        {
          bitmap blocks_to_reset = NULL;
-         if (*dflow->problem->reset_fun)
+         if (dflow->problem->reset_fun)
            {
              if (!blocks_to_reset)
                {
@@ -462,7 +462,7 @@ df_rescan_blocks (struct df *df, bitmap blocks)
                  if (df->blocks_to_scan)
                    bitmap_ior_into (blocks_to_reset, df->blocks_to_scan);
                }
-             (*dflow->problem->reset_fun) (dflow, blocks_to_reset);
+             dflow->problem->reset_fun (dflow, blocks_to_reset);
            }
          if (blocks_to_reset)
            BITMAP_FREE (blocks_to_reset);
@@ -549,7 +549,7 @@ df_ref_create (struct df *df, rtx reg, rtx *loc, rtx insn,
 ----------------------------------------------------------------------------*/
 
 
-/* Get the artifical uses for a basic block.  */
+/* Get the artificial uses for a basic block.  */
 
 struct df_ref *
 df_get_artificial_defs (struct df *df, unsigned int bb_index)
@@ -559,7 +559,7 @@ df_get_artificial_defs (struct df *df, unsigned int bb_index)
 }
 
 
-/* Get the artifical uses for a basic block.  */
+/* Get the artificial uses for a basic block.  */
 
 struct df_ref *
 df_get_artificial_uses (struct df *df, unsigned int bb_index)
@@ -797,7 +797,7 @@ df_bb_refs_delete (struct dataflow *dflow, int bb_index)
        }
     }
   
-  /* Get rid of any artifical uses or defs.  */
+  /* Get rid of any artificial uses or defs.  */
   if (bb_info)
     {
       def = bb_info->artificial_defs;
@@ -1116,9 +1116,8 @@ df_def_record_1 (struct dataflow *dflow, rtx x,
     loc = &SET_DEST (x);
   dst = *loc;
 
-  /* Some targets place small structures in registers for
-     return values of functions.  */
-  if (GET_CODE (dst) == PARALLEL && GET_MODE (dst) == BLKmode)
+  /* It is legal to have a set destination be a parallel. */
+  if (GET_CODE (dst) == PARALLEL)
     {
       int i;
 
@@ -1572,7 +1571,8 @@ df_bb_refs_record (struct dataflow *dflow, basic_block bb)
          unsigned regno = EH_RETURN_DATA_REGNO (i);
          if (regno == INVALID_REGNUM)
            break;
-         df_ref_record (dflow, regno_reg_rtx[i], &regno_reg_rtx[i], bb, NULL,
+         df_ref_record (dflow, regno_reg_rtx[regno], &regno_reg_rtx[regno],
+                        bb, NULL,
                         DF_REF_REG_DEF, DF_REF_ARTIFICIAL | DF_REF_AT_TOP,
                         false);
        }
@@ -1599,7 +1599,7 @@ df_bb_refs_record (struct dataflow *dflow, basic_block bb)
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
        if (EH_USES (i))
          df_uses_record (dflow, &regno_reg_rtx[i], 
-                         DF_REF_REG_USE, EXIT_BLOCK_PTR, NULL,
+                         DF_REF_REG_USE, bb, NULL,
                          DF_REF_ARTIFICIAL | DF_REF_AT_TOP);
 #endif
 
@@ -1750,8 +1750,10 @@ df_record_entry_block_defs (struct dataflow * dflow)
     }
   else
     {
+#ifdef INCOMING_RETURN_ADDR_RTX
       if (REG_P (INCOMING_RETURN_ADDR_RTX))
        bitmap_set_bit (df->entry_block_defs, REGNO (INCOMING_RETURN_ADDR_RTX));
+#endif
             
       /* If STATIC_CHAIN_INCOMING_REGNUM == STATIC_CHAIN_REGNUM
         only STATIC_CHAIN_REGNUM is defined.  If they are different,
@@ -1802,7 +1804,7 @@ df_record_entry_block_defs (struct dataflow * dflow)
 #endif
     }
 
-  (*targetm.live_on_entry) (df->entry_block_defs);
+  targetm.live_on_entry (df->entry_block_defs);
 
   EXECUTE_IF_SET_IN_BITMAP (df->entry_block_defs, 0, i, bi)
     {