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]

Re: [Ada] Macro-ize a couple of wrappers


Out of curiosity was the performance gain measurable?

I would have assumed inlining would do a good job
on code like the following:

-tree
-create_var_decl (tree var_name, tree asm_name, tree type, tree
var_init,
-                bool const_flag, bool public_flag, bool extern_flag,
-                bool static_flag, struct attrib *attr_list,
-                Node_Id gnat_node)
-{
-  return create_var_decl_1 (var_name, asm_name, type, var_init,
-                           const_flag, true,
-                           public_flag, extern_flag, static_flag,
-                           attr_list, gnat_node);
-}

Laurent

On Fri, 2008-04-18 at 11:20 +0200, Eric Botcazou wrote:
> For efficiency reasons.
> 
> Tested on i586-suse-linux, applied on the mainline.
> 
> 
> 2008-04-18  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gigi.h (create_var_decl_1): Declare.
> 	(create_var_decl): Turn into a macro invoking create_var_decl_1.
> 	(create_true_var_decl): Likewise.
> 	* utils.c (create_var_decl_1): Make global and reorder parameters.
> 	(create_var_decl): Delete.
> 	(create_true_var_decl): Likewise.
> 
> 


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