Remove unused parameter to estimate_edge_size_and_time
diff mbox series

Message ID 20191119190910.tvtx7s2wohit5f7a@kam.mff.cuni.cz
State New
Headers show
Series
  • Remove unused parameter to estimate_edge_size_and_time
Related show

Commit Message

Jan Hubicka Nov. 19, 2019, 7:09 p.m. UTC
Hi,
this patch removes unused argument of estimate_edge_size_and_time.
Bootstrapped/regtested x86_64-linux, comitted.

	* ipa-fnsummary.c (estimate_edge_size_and_time): Drop parameter PROP.
	(estimate_calls_size_and_time): Update.

Patch
diff mbox series

Index: ipa-fnsummary.c
===================================================================
--- ipa-fnsummary.c	(revision 278441)
+++ ipa-fnsummary.c	(working copy)
@@ -2950,7 +2950,6 @@  estimate_edge_devirt_benefit (struct cgr
 static inline void
 estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size,
 			     sreal *time,
-			     int prob,
 			     vec<tree> known_vals,
 			     vec<ipa_polymorphic_call_context> known_contexts,
 			     vec<ipa_agg_value_set> known_aggs,
@@ -2960,6 +2959,7 @@  estimate_edge_size_and_time (struct cgra
   int call_size = es->call_stmt_size;
   int call_time = es->call_stmt_time;
   int cur_size;
+
   if (!e->callee && hints && e->maybe_hot_p ()
       && estimate_edge_devirt_benefit (e, &call_size, &call_time,
 				       known_vals, known_contexts, known_aggs))
@@ -2968,12 +2968,8 @@  estimate_edge_size_and_time (struct cgra
   *size += cur_size;
   if (min_size)
     *min_size += cur_size;
-  if (!time)
-    ;
-  else if (prob == REG_BR_PROB_BASE)
+  if (time)
     *time += ((sreal)call_time) * e->sreal_frequency ();
-  else
-    *time += ((sreal)call_time * prob) * e->sreal_frequency ();
 }
 
 
@@ -3019,7 +3015,7 @@  estimate_calls_size_and_time (struct cgr
 	     sowe do not need to compute probabilities.  */
 	  estimate_edge_size_and_time (e, size,
 				       es->predicate ? NULL : min_size,
-				       time, REG_BR_PROB_BASE,
+				       time,
 				       known_vals, known_contexts,
 				       known_aggs, hints);
 	}
@@ -3031,7 +3027,7 @@  estimate_calls_size_and_time (struct cgr
 	  || es->predicate->evaluate (possible_truths))
 	estimate_edge_size_and_time (e, size,
 				     es->predicate ? NULL : min_size,
-				     time, REG_BR_PROB_BASE,
+				     time,
 				     known_vals, known_contexts, known_aggs,
 				     hints);
     }