bugfixes, comments``
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 23 Feb 2005 17:05:10 +0000 (17:05 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 23 Feb 2005 17:05:10 +0000 (17:05 +0000)
[r5224]

ir/ana/callgraph.c
ir/ana/execution_frequency.c
ir/ana/irscc.c

index c7a0137..b015634 100644 (file)
@@ -1129,6 +1129,9 @@ double get_irg_method_execution_frequency (ir_graph *irg) {
 
 void set_irg_method_execution_frequency (ir_graph *irg, double freq) {
   irg->method_execution_frequency = freq;
 
 void set_irg_method_execution_frequency (ir_graph *irg, double freq) {
   irg->method_execution_frequency = freq;
+
+  if (irp->max_method_execution_frequency < freq)
+    irp->max_method_execution_frequency = freq;
 }
 
 static void compute_method_execution_frequency (ir_graph *irg, void *env) {
 }
 
 static void compute_method_execution_frequency (ir_graph *irg, void *env) {
@@ -1286,10 +1289,6 @@ void compute_performance_estimates(void) {
 
   DEL_ARR_F(e.loop_stack);
 
 
   DEL_ARR_F(e.loop_stack);
 
-  //dump_callgraph("-with_nesting");
-  //dump_callgraph_loop_tree(current_loop, "-after_cons");
-
-
   /* -- compute the execution frequency -- */
   irp->max_method_execution_frequency = 0;
   master_cg_visited += 2;
   /* -- compute the execution frequency -- */
   irp->max_method_execution_frequency = 0;
   master_cg_visited += 2;
index 08e845c..bacf73e 100644 (file)
@@ -60,8 +60,12 @@ INLINE double get_region_exec_freq(void *reg) {
   ef.reg  = reg;
 
   found = set_find(exec_freq_set, &ef, sizeof(ef), exec_freq_hash(&ef));
   ef.reg  = reg;
 
   found = set_find(exec_freq_set, &ef, sizeof(ef), exec_freq_hash(&ef));
-  assert(found);
-  return found->freq;
+
+  /* Not found if information is invalid. */
+  if (found)
+    return found->freq;
+  else
+    return 0;
 }
 
 /* Returns the number of times the block is executed. */
 }
 
 /* Returns the number of times the block is executed. */
index b33af42..33dd08f 100644 (file)
@@ -999,7 +999,7 @@ static void scc (ir_node *n) {
 
       /* The current backedge has been marked, that is temporarily eliminated,
         by find tail. Start the scc algorithm
 
       /* The current backedge has been marked, that is temporarily eliminated,
         by find tail. Start the scc algorithm
-        anew on the subgraph thats left (the current loop without the backedge)
+        anew on the subgraph that is left (the current loop without the backedge)
         in order to find more inner loops. */
       scc (tail);
 
         in order to find more inner loops. */
       scc (tail);
 
@@ -1097,7 +1097,7 @@ static void my_scc (ir_node *n) {
 
       /* The current backedge has been marked, that is temporarily eliminated,
         by find tail. Start the scc algorithm
 
       /* The current backedge has been marked, that is temporarily eliminated,
         by find tail. Start the scc algorithm
-        anew on the subgraph thats left (the current loop without the backedge)
+        anew on the subgraph that is left (the current loop without the backedge)
         in order to find more inner loops. */
       my_scc (tail);
 
         in order to find more inner loops. */
       my_scc (tail);