OSDN Git Service

DFA model for Core 2 and Core i7 scheduling.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-threadupdate.c
index dedd00e..4621eec 100644 (file)
@@ -24,14 +24,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
-#include "rtl.h"
 #include "tm_p.h"
-#include "ggc.h"
 #include "basic-block.h"
 #include "output.h"
-#include "expr.h"
 #include "function.h"
-#include "diagnostic.h"
 #include "tree-flow.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
@@ -325,9 +321,11 @@ create_edge_and_update_destination_phis (struct redirection_data *rd)
   for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
     {
       gimple phi = gsi_stmt (gsi);
-
+      source_location locus;
       int indx = rd->outgoing_edge->dest_idx;
-      add_phi_arg (phi, gimple_phi_arg_def (phi, indx), e);
+
+      locus = gimple_phi_arg_location (phi, indx);
+      add_phi_arg (phi, gimple_phi_arg_def (phi, indx), e, locus);
     }
 }
 
@@ -476,9 +474,10 @@ redirection_block_p (basic_block bb)
   gsi = gsi_start_bb (bb);
   while (!gsi_end_p (gsi)
          && (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
+            || is_gimple_debug (gsi_stmt (gsi))
              || gimple_nop_p (gsi_stmt (gsi))))
     gsi_next (&gsi);
-  
+
   /* Check if this is an empty block.  */
   if (gsi_end_p (gsi))
     return true;
@@ -632,7 +631,6 @@ thread_single_edge (edge e)
   basic_block bb = e->dest;
   edge eto = (edge) e->aux;
   struct redirection_data rd;
-  struct local_info local_info;
 
   e->aux = NULL;
 
@@ -654,7 +652,6 @@ thread_single_edge (edge e)
   /* Otherwise, we need to create a copy.  */
   update_bb_profile_for_threading (bb, EDGE_FREQUENCY (e), e->count, eto);
 
-  local_info.bb = bb;
   rd.outgoing_edge = eto;
 
   create_block_for_threading (bb, &rd);
@@ -906,7 +903,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
       else
        tgt_bb = split_edge (tgt_edge);
     }
-      
+
   if (latch->aux)
     {
       /* First handle the case latch edge is redirected.  */
@@ -948,7 +945,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
       loop->header = latch->dest;
       loop->latch = latch->src;
     }
-  
+
   return true;
 
 fail:
@@ -994,7 +991,7 @@ mark_threaded_blocks (bitmap threaded_blocks)
 
   /* If optimizing for size, only thread through block if we don't have
      to duplicate it or it's an otherwise empty redirection block.  */
-  if (optimize_size)
+  if (optimize_function_for_size_p (cfun))
     {
       EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, bi)
        {