This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Macro-ize a couple of wrappers
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Apr 2008 13:30:17 +0200
- Subject: Re: [Ada] Macro-ize a couple of wrappers
- References: <200804181120.02865.ebotcazou@adacore.com>
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.
>
>