Commit b439486d by Jan Hubicka Committed by Jan Hubicka

ipa-inline.c (relative_time_benefit): Fix wrong bracketting.


	* ipa-inline.c (relative_time_benefit): Fix wrong bracketting.
	* ipa-inline.h (estimate_edge_time): Fix pasto.
	* ipa-inline-analysis.c (do_estiamte_edge_time): Remove capping.

From-SVN: r179064
parent e9fcc707
2011-09-21 Jan Hubicka <jh@suse.cz>
* ipa-inline.c (relative_time_benefit): Fix wrong bracketting.
* ipa-inline.h (estimate_edge_time): Fix pasto.
* ipa-inline-analysis.c (do_estiamte_edge_time): Remove capping.
2011-09-21 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (ix86_expand_sse_movcc): Use
......@@ -2164,10 +2164,9 @@ do_estimate_edge_time (struct cgraph_edge *edge)
evaluate_conditions_for_edge (edge, true),
&size, &time);
ret = (((gcov_type)time - es->call_stmt_time) * edge->frequency
ret = (((gcov_type)time
- es->call_stmt_time) * edge->frequency
+ CGRAPH_FREQ_BASE / 2) / CGRAPH_FREQ_BASE;
if (ret > MAX_TIME)
ret = MAX_TIME;
/* When caching, update the cache entry. */
if (edge_growth_cache)
......
......@@ -710,9 +710,8 @@ relative_time_benefit (struct inline_summary *callee_info,
uninlined_call_time =
((gcov_type)
(callee_info->time
+ inline_edge_summary (edge)->call_stmt_time
+ CGRAPH_FREQ_BASE / 2) * edge->frequency
/ CGRAPH_FREQ_BASE);
+ inline_edge_summary (edge)->call_stmt_time) * edge->frequency
+ CGRAPH_FREQ_BASE / 2) / CGRAPH_FREQ_BASE;
/* Compute relative time benefit, i.e. how much the call becomes faster.
??? perhaps computing how much the caller+calle together become faster
would lead to more realistic results. */
......
......@@ -219,7 +219,7 @@ estimate_edge_time (struct cgraph_edge *edge)
if ((int)VEC_length (edge_growth_cache_entry, edge_growth_cache) <= edge->uid
|| !(ret = VEC_index (edge_growth_cache_entry,
edge_growth_cache,
edge->uid)->size))
edge->uid)->time))
return do_estimate_edge_time (edge);
return ret - (ret > 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment