OSDN Git Service

Fixup whitespaces
[pf3gnuchains/gcc-fork.git] / gcc / profile.c
index 45abbc4..2f6d8aa 100644 (file)
@@ -72,12 +72,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 /* Hooks for profiling.  */
 static struct profile_hooks* profile_hooks;
 
-/* File for profiling debug output.  */
-static inline FILE*
-profile_dump_file (void) {
-  return profile_hooks->profile_dump_file ();
-}
-
 /* Additional information about the edges we need.  */
 struct edge_info {
   unsigned int count_valid : 1;
@@ -471,7 +465,7 @@ compute_branch_probabilities (void)
        }
     }
   if (dump_file)
-    dump_flow_info (dump_file);
+    dump_flow_info (dump_file, dump_flags);
 
   total_num_passes += passes;
   if (dump_file)
@@ -693,8 +687,7 @@ compute_value_histograms (histogram_values values)
 
       hist->hvalue.next = ann->histograms;
       ann->histograms = hist;
-      hist->hvalue.counters = 
-           xmalloc (sizeof (gcov_type) * hist->n_counters);
+      hist->hvalue.counters =  XNEWVEC (gcov_type, hist->n_counters);
       for (j = 0; j < hist->n_counters; j++)
        hist->hvalue.counters[j] = aact_count[j];
     }
@@ -1156,8 +1149,8 @@ branch_prob (void)
       /* Re-merge split basic blocks and the mess introduced by
         insert_insn_on_edge.  */
       cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
-      if (profile_dump_file())
-       dump_flow_info (profile_dump_file());
+      if (dump_file)
+       dump_flow_info (dump_file, dump_flags);
     }
 
   free_edge_list (el);
@@ -1343,45 +1336,3 @@ tree_register_profile_hooks (void)
   profile_hooks = &tree_profile_hooks;
 }
 
-\f
-/* Do branch profiling and static profile estimation passes.  */
-static void
-rest_of_handle_branch_prob (void)
-{
-  struct loops loops;
-
-  /* Discover and record the loop depth at the head of each basic
-     block.  The loop infrastructure does the real job for us.  */
-  flow_loops_find (&loops);
-
-  if (dump_file)
-    flow_loops_dump (&loops, dump_file, NULL, 0);
-
-  /* Estimate using heuristics if no profiling info is available.  */
-  if (flag_guess_branch_prob
-      && profile_status == PROFILE_ABSENT)
-    estimate_probability (&loops);
-
-  flow_loops_free (&loops);
-  free_dominance_info (CDI_DOMINATORS);
-}
-
-struct tree_opt_pass pass_branch_prob =
-{
-  "bp",                                 /* name */
-  NULL,                                 /* gate */   
-  rest_of_handle_branch_prob,           /* execute */       
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_BRANCH_PROB,                       /* tv_id */
-  0,                                    /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  TODO_dump_func,                       /* todo_flags_finish */
-  'b'                                   /* letter */
-};
-
-
-