[PATCH][3.3] PR 7257 (flag_inline_functions doesn't show up with -fverbose-asm)

Steven Bosscher s.bosscher@student.tudelft.nl
Mon Apr 7 11:06:00 GMT 2003


Op za 05-04-2003, om 21:22 schreef Zack Weinberg:
> Here is my suggestion:  Add a boolean field to the langhooks
> structure, uses_rtl_inliner.  The default for this field is false.
> Make the Fortran and Ada front ends override it to true.  (I think
> those are the only statement-at-a-time front ends left.)  Then remove
> flag_inline_trees entirely.  Instead, have both the RTL and tree
> inliners look at flag_inline_functions to decide what to do, but
> disable each one entirely if uses_rtl_inliner says so.

Something like this?  Bootstrapped and regtested on i586-pc-linux-gnu.

Frankly I like the other fix better.

2003-04-07  Steven Bosscher  <steven@gcc.gnu.org>

	PR c/7257
	* langhooks.h (lang_hooks): New uses_rtl_inliner langhook.
	* langhooks-def.h (LANG_HOOKS_USES_RTL_INLINER): Define,
	default to false.  Add to LANG_HOOKS_INITIALIZER.
	* flags.h (flag_inline_functions): Update comment;
	mention	the use of the flag for different inliners.
	* toplev.c (flag_inline_functions): Ditto.
	(f_): Default flag_inline_functions to 2.
	(rest_of_compilation): Only use RTL inliner if the
	uses_rtl_inliner langhook is set.
	(parse_options_and_default_flags): At -O3, set
	flag_inline_functions to 2.
	* expr.c (clear_pending_stack_adjust): If uses_rtl_inliner
	langhook is false, this is always safe.
	* tree-inline.h (flag_inline_trees): Remove.
	* tree-inline.c (flag_inline_trees): Ditto.
	(inlinable_function_p): Replace flag_inline_trees with
	flag_inline_functions.
	* c-opts.c (c_common_post_options): If -finline-functions
	is not set its default 2 in toplev, set it to 1 here.
	* c-decl.c (grokdeclarator): Replace flag_inline_trees
	with flag_inline_functions.
	(c_expand_body): Ditto.
	* ada/misc.c (LANG_HOOKS_USES_RTL_INLINER): Set to true.
	* f/com.c (LANG_HOOKS_USES_RTL_INLINER): Set to true.
	* config/c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): Remove now
	redundant reference to flag_inline_trees.
	* cp/decl.c (cxx_init_decl_processing): If -fno-inline is
	not set, consider some functions for inlining even if
	-finline-functions is not set.
	(grokfndecl): Replace flag_inline_trees with
	flag_inline_functions.
	* cp/optimize.c (optimize_function): Ditto.
	* cp/semantics.c (expand_body): Ditto.
	(genrtl_finish_function): Ditto.
	* java/class.c (compile_resource_file): Remove redundant
	"Gross hack", taken care of in toplev now.
	* java/decl.c (dump_function): Replace flag_inline_trees
	with flag_inline_functions.
	* java/lang.c (java_decode_option): Set flag_inline_functions
	to its default of 2.
	(java_init): Don't set flag_inline_trees.
	(java_post_options): Inline some "inline" functions even if
	-finline-functions is not set.  Remove all flag_inline_trees
	related stuff.
	* java/parse.y (java_expand_method_bodies): Replace
 	flag_inline_trees with flag_inline_functions.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 24772 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030407/eac2ef6b/attachment.bin>


More information about the Gcc-patches mailing list