OSDN Git Service

2002-11-15 Eric Botcazou <ebotcazou@libertysurf.fr>
[pf3gnuchains/gcc-fork.git] / gcc / ssa-ccp.c
index be1b0dd..44f4921 100644 (file)
@@ -120,7 +120,6 @@ static sbitmap ssa_edges;
 
 /* Simple macros to simplify code */
 #define SSA_NAME(x) REGNO (SET_DEST (x))
-#define PHI_PARMS(x) XVEC (SET_SRC (x), 0)
 #define EIE(x,y) EDGE_INDEX (edges, x, y)
 
 static void visit_phi_node             PARAMS ((rtx, basic_block));
@@ -648,13 +647,13 @@ examine_flow_edges ()
 
       /* If this is the first time we've simulated this block, then we
         must simulate each of its insns.  */
-      if (!TEST_BIT (executable_blocks, succ_block->sindex))
+      if (!TEST_BIT (executable_blocks, succ_block->index))
        {
          rtx currinsn;
          edge succ_edge = succ_block->succ;
 
          /* Note that we have simulated this block.  */
-         SET_BIT (executable_blocks, succ_block->sindex);
+         SET_BIT (executable_blocks, succ_block->index);
 
          /* Simulate each insn within the block.  */
          currinsn = succ_block->head;
@@ -762,15 +761,15 @@ optimize_unexecutable_edges (edges, executable_edges)
                  remove_phi_alternative (PATTERN (insn), edge->src);
                  if (rtl_dump_file)
                    fprintf (rtl_dump_file,
-                            "Removing alternative for bb %d of phi %d\n", 
-                            edge->src->sindex, SSA_NAME (PATTERN (insn)));
+                            "Removing alternative for bb %d of phi %d\n",
+                            edge->src->index, SSA_NAME (PATTERN (insn)));
                  insn = NEXT_INSN (insn);
                }
            }
          if (rtl_dump_file)
            fprintf (rtl_dump_file,
                     "Removing unexecutable edge from %d to %d\n",
-                    edge->src->sindex, edge->dest->sindex);
+                    edge->src->index, edge->dest->index);
          /* Since the edge was not executable, remove it from the CFG.  */
          remove_edge (edge);
        }
@@ -798,7 +797,7 @@ optimize_unexecutable_edges (edges, executable_edges)
      In cases B & C we are removing uses of registers, so make sure
      to note those changes for the DF analyzer.  */
 
-  FOR_ALL_BB (bb)
+  FOR_EACH_BB (bb)
     {
       rtx insn = bb->end;
       edge edge = bb->succ;
@@ -937,7 +936,7 @@ ssa_ccp_df_delete_unreachable_insns ()
   /* Now we know what blocks are not reachable.  Mark all the insns
      in those blocks as deleted for the DF analyzer.   We'll let the
      normal flow code actually remove the unreachable blocks.  */
-  FOR_ALL_BB_REVERSE (b)
+  FOR_EACH_BB_REVERSE (b)
     {
       if (!(b->flags & BB_REACHABLE))
        {
@@ -991,9 +990,6 @@ ssa_const_prop ()
   df_analyse (df_analyzer, 0,
              DF_RD_CHAIN | DF_RU_CHAIN | DF_REG_INFO | DF_HARD_REGS);
 
-  /* We need mappings from insn to its containing block.  */
-  compute_bb_for_insn (get_max_uid ());
-
   /* Perform a quick and dirty dead code elimination pass.  This is not
      as aggressive as it could be, but it's good enough to clean up a
      lot of unwanted junk and it is fast.  */