OSDN Git Service

2004-08-04 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / predict.c
index c92b27f..d89282d 100644 (file)
@@ -636,7 +636,7 @@ estimate_probability (struct loops *loops_info)
   FOR_EACH_BB (bb)
     {
       rtx last_insn = BB_END (bb);
-      rtx cond, earliest;
+      rtx cond;
       edge e;
 
       if (! can_predict_insn_p (last_insn))
@@ -681,7 +681,7 @@ estimate_probability (struct loops *loops_info)
            }
        }
 
-      cond = get_condition (last_insn, &earliest, false);
+      cond = get_condition (last_insn, NULL, false, false);
       if (! cond)
        continue;
 
@@ -805,6 +805,8 @@ estimate_probability (struct loops *loops_info)
     }
   estimate_bb_frequencies (loops_info);
   free_dominance_info (CDI_POST_DOMINATORS);
+  if (profile_status == PROFILE_ABSENT)
+    profile_status = PROFILE_GUESSED;
 }
 \f
 
@@ -988,6 +990,8 @@ tree_estimate_probability (void)
   flow_loops_free (&loops_info);
   if (dump_file && (dump_flags & TDF_DETAILS))
     dump_tree_cfg (dump_file, dump_flags);
+  if (profile_status == PROFILE_ABSENT)
+    profile_status = PROFILE_GUESSED;
 }
 \f
 /* __builtin_expect dropped tokens into the insn stream describing expected
@@ -1043,7 +1047,8 @@ expected_value_to_br_prob (void)
                (lt r70, r71)
         Could use cselib to try and reduce this further.  */
       cond = XEXP (SET_SRC (pc_set (insn)), 0);
-      cond = canonicalize_condition (insn, cond, 0, NULL, ev_reg, false);
+      cond = canonicalize_condition (insn, cond, 0, NULL, ev_reg,
+                                    false, false);
       if (! cond || XEXP (cond, 0) != ev_reg
          || GET_CODE (XEXP (cond, 1)) != CONST_INT)
        continue;