Commit 23ff8c05 by Jan Hubicka Committed by Jan Hubicka

Fix nonspec_time when there is no cached value.

	* ipa-inline.h (do_estimate_edge_time): Add nonspec_time
	parameter.
	(estimate_edge_time): Use it.
	* ipa-inline-analysis.c (do_estimate_edge_time): Add
	ret_nonspec_time parameter.

From-SVN: r278333
parent 6d1402f0
2019-11-15 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.h (do_estimate_edge_time): Add nonspec_time
parameter.
(estimate_edge_time): Use it.
* ipa-inline-analysis.c (do_estimate_edge_time): Add
ret_nonspec_time parameter.
2019-11-15 Szabolcs Nagy <szabolcs.nagy@arm.com> 2019-11-15 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config/m68k/linux.h (MUSL_DYNAMIC_LINKER): Define. * config/m68k/linux.h (MUSL_DYNAMIC_LINKER): Define.
...@@ -179,7 +179,7 @@ simple_edge_hints (struct cgraph_edge *edge) ...@@ -179,7 +179,7 @@ simple_edge_hints (struct cgraph_edge *edge)
size, since we always need both metrics eventually. */ size, since we always need both metrics eventually. */
sreal sreal
do_estimate_edge_time (struct cgraph_edge *edge) do_estimate_edge_time (struct cgraph_edge *edge, sreal *ret_nonspec_time)
{ {
sreal time, nonspec_time; sreal time, nonspec_time;
int size; int size;
...@@ -275,6 +275,8 @@ do_estimate_edge_time (struct cgraph_edge *edge) ...@@ -275,6 +275,8 @@ do_estimate_edge_time (struct cgraph_edge *edge)
hints |= simple_edge_hints (edge); hints |= simple_edge_hints (edge);
entry->hints = hints + 1; entry->hints = hints + 1;
} }
if (ret_nonspec_time)
*ret_nonspec_time = nonspec_time;
return time; return time;
} }
......
...@@ -46,7 +46,7 @@ int estimate_size_after_inlining (struct cgraph_node *, struct cgraph_edge *); ...@@ -46,7 +46,7 @@ int estimate_size_after_inlining (struct cgraph_node *, struct cgraph_edge *);
int estimate_growth (struct cgraph_node *); int estimate_growth (struct cgraph_node *);
bool growth_positive_p (struct cgraph_node *, struct cgraph_edge *, int); bool growth_positive_p (struct cgraph_node *, struct cgraph_edge *, int);
int do_estimate_edge_size (struct cgraph_edge *edge); int do_estimate_edge_size (struct cgraph_edge *edge);
sreal do_estimate_edge_time (struct cgraph_edge *edge); sreal do_estimate_edge_time (struct cgraph_edge *edge, sreal *nonspec_time = NULL);
ipa_hints do_estimate_edge_hints (struct cgraph_edge *edge); ipa_hints do_estimate_edge_hints (struct cgraph_edge *edge);
void reset_node_cache (struct cgraph_node *node); void reset_node_cache (struct cgraph_node *node);
void initialize_growth_caches (); void initialize_growth_caches ();
...@@ -99,7 +99,7 @@ estimate_edge_time (struct cgraph_edge *edge, sreal *nonspec_time = NULL) ...@@ -99,7 +99,7 @@ estimate_edge_time (struct cgraph_edge *edge, sreal *nonspec_time = NULL)
if (edge_growth_cache == NULL if (edge_growth_cache == NULL
|| (entry = edge_growth_cache->get (edge)) == NULL || (entry = edge_growth_cache->get (edge)) == NULL
|| entry->time == 0) || entry->time == 0)
return do_estimate_edge_time (edge); return do_estimate_edge_time (edge, nonspec_time);
if (nonspec_time) if (nonspec_time)
*nonspec_time = edge_growth_cache->get (edge)->nonspec_time; *nonspec_time = edge_growth_cache->get (edge)->nonspec_time;
return entry->time; return entry->time;
......
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