[RFA] new code size estimation for inlining

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Tue Jul 1 21:54:00 GMT 2003


On Mon, 30 Jun 2003, Jan Hubicka wrote:
> this patch implements the new estimation of body size via langhook.
> [...]
> Since SPEC2000 is poor testcase for inlining I also use Gerald's application.
> On his application I get:
>
> 				time		stripped size
> mainline     			3m0.440s 	1606860
> new estimate 			2m55.360s 	1667564
> unit-at-a-time based inlining	2m23.130s	1486764
> [...]
> The performance is as follows (times in seconds followed by variations
> between 3 runs):

I had a _very_ close look at these benchmarks (because I am well used to
interpreting them, and various changes may indicate more of a "random"
fluctuation than others) and from that point of view, this patch really
looks fine.

> Mon Jun 30 22:50:59 CEST 2003  Jan Hubicka  <jh@suse.cz>
> 	* c-common.c (c_estimate_num_insns_1): New static function.
> 	(c_estimate_num_insns): New global function.
> 	* c-common.h (DECL_NUM_STMTS): Rename to...
> 	(DECL_ESTIMATED_INSNS): ... this.
> 	(c_estimate_num_insns): Declare.
> 	* c-decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
> 	* c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
> 	* c-semantics.c (add_stmt): Do not account statements.
> 	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS):
> 	New.
> 	* langhooks.h (lang_hooks_for_tree_inlining): Add
> 	estimate_num_insns
> 	* params.def (max-inline-insns-auto, max-inline-insns-auto): set
> 	to 100.

Thanks,
Gerald



More information about the Gcc-patches mailing list