This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Cost of inlining when the function has call to a target-specific builtin


Hi,
While inlining, the cost of a call to a target-specific builtin is
assumed to be the same as that of a call to any other function by
tree-inline.c. This patch allows the backend to examine the builtin
and suggest an appropriate value.

2007-09-16  Pranav Bhandarkar  <pranav.bhandarkar@celunite.com>
            Ramana Radhakrishnan  <ramana.radhakrishnan@celunite.com>
	
	* target.h (inline_builtin_call): New hook.
	* expr.h (default_inline_builtin_call): New.
	* builtins.c (params.h): Include.	
	(default_inline_builtin_call): New. Define.
	* target-def.h (TARGET_INLINE_BUILTIN_CALL): New
	(TARGET_INITIALIZER): Add TARGET_INLINE_BUILTIN_CALL.
	* tree-inline.c (estimate_num_insns_1): For CALL_EXPR check for
	target-specific builtin. If so get the cost for inlining from the backend.


Is this ok ?

cheers!
Pranav

Attachment: builtin-inline-cost
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]