public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Eric Botcazou <ebotcazou@adacore.com>, gcc-patches@gcc.gnu.org
Subject: Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)
Date: Mon, 12 Sep 2016 19:45:00 -0000	[thread overview]
Message-ID: <a7bc0918-a2bf-f6af-e8d8-13dc65c9ffee@redhat.com> (raw)
In-Reply-To: <8467344.X3JSntxAug@arcturus.home>

On 09/04/2016 02:10 PM, Eric Botcazou wrote:
> This is the common infrastructure part.  As explained in the initial message,
> nothing is activated unless both the language and the target opt in.
>
>
> 2016-07-04  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	PR ada/37139
> 	PR ada/67205
> 	* common.opt (-ftrampolines): New option.
> 	* doc/invoke.texi (Code Gen Options): Document it.
> 	* doc/tm.texi.in (Trampolines): AddTARGET_CUSTOM_FUNCTION_DESCRIPTORS
> 	* doc/tm.texi: Regenerate.
> 	* builtins.def: Add init_descriptor and adjust_descriptor.
> 	* builtins.c (expand_builtin_init_trampoline): Do not issue a warning
> 	on platforms with descriptors.
> 	(expand_builtin_init_descriptor): New function.
> 	(expand_builtin_adjust_descriptor): Likewise.
> 	(expand_builtin) <BUILT_IN_INIT_DESCRIPTOR>: New case.
> 	<BUILT_IN_ADJUST_DESCRIPTOR>: Likewise.
> 	* calls.c (prepare_call_address): Remove SIBCALLP parameter and add
> 	FLAGS parameter.  Deal with indirect calls by descriptor and adjust.
> 	Set STATIC_CHAIN_REG_P on the static chain register, if any.
> 	(call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor.
> 	(expand_call): Likewise.  Move around call to prepare_call_address
> 	and pass all flags to it.
> 	* cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR.
> 	* gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value.
> 	(gimple_call_set_by_descriptor): New setter.
> 	(gimple_call_by_descriptor_p): New getter.
> 	* gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR.
> 	(gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR.
> 	* langhooks.h (struct lang_hooks): Add custom_function_descriptors.
> 	* langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define.
> 	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS.
> 	* rtl.h (STATIC_CHAIN_REG_P): New macro.
> 	* rtlanal.c (find_first_parameter_load): Skip static chain registers.
> 	* target.def (custom_function_descriptors): New POD hook.
> 	* tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR.
> 	(CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR.
> 	* tree-core.h (ECF_BY_DESCRIPTOR): New mask.
> 	Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR.
> 	* tree.c (make_node_stat) <tcc_declaration>: Use FUNCTION_ALIGNMENT.
> 	(build_common_builtin_nodes): Initialize init_descriptor and
> 	adjust_descriptor.
> 	* tree-nested.c: Include target.h.
> 	(struct nesting_info): Add 'any_descr_created' field.
> 	(get_descriptor_type): New function.
> 	(lookup_element_for_decl): New function extracted from...
> 	(create_field_for_decl): Likewise.
> 	(lookup_tramp_for_decl): ...here.  Adjust.
> 	(lookup_descr_for_decl): New function.
> 	(convert_tramp_reference_op): Deal with descriptors.
> 	(build_init_call_stmt): New function extracted from...
> 	(finalize_nesting_tree_1): ...here.  Adjust and deal withdescriptors.
> 	* defaults.h (FUNCTION_ALIGNMENT): Define.
> 	(TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY.
>
ANd just to be clear, I'm assuming you'll self-approve the Ada bits :-)

jeff

  parent reply	other threads:[~2016-09-12 19:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04 20:10 [patch v2] Get rid of stack trampolines for nested functions (0/4) Eric Botcazou
2016-09-04 20:12 ` [patch v2] Get rid of stack trampolines for nested functions (1/4) Eric Botcazou
2016-09-12 19:41   ` Jeff Law
2016-09-12 19:45   ` Jeff Law [this message]
2016-12-05 20:52   ` Ian Lance Taylor
2016-12-05 21:29     ` Lynn A. Boger
2016-12-05 22:41       ` Ian Lance Taylor
2016-12-05 22:12     ` Eric Botcazou
2016-12-06 17:52       ` Eric Botcazou
2016-12-06 20:18         ` Ian Lance Taylor
2016-12-06 21:59           ` Lynn A. Boger
2016-12-06 22:26             ` Eric Botcazou
2016-12-07 13:38               ` Lynn A. Boger
2016-12-07 13:56                 ` Eric Botcazou
2016-12-07  7:23           ` Eric Botcazou
2017-03-23 16:48   ` Andreas Schwab
2017-03-28 17:01     ` Eric Botcazou
2017-03-29 10:05       ` Andreas Schwab
2017-03-29 14:05         ` Eric Botcazou
2017-03-29 14:15           ` Andreas Schwab
2016-09-04 20:14 ` [patch v2] Get rid of stack trampolines for nested functions (2/4) Eric Botcazou
2016-09-04 20:15 ` [patch v2] Get rid of stack trampolines for nested functions (3/4) Eric Botcazou
2016-09-05 10:52   ` Segher Boessenkool
2016-09-12 19:56   ` Jeff Law
2016-09-04 21:31 ` [patch v2] Get rid of stack trampolines for nested functions (4/4) Eric Botcazou
2016-10-16 20:29 ` [patch v2] Get rid of stack trampolines for nested functions (0/4) Eric Botcazou
2016-10-17 10:40   ` Andreas Schwab
2016-10-17 11:14     ` Eric Botcazou
2016-10-17 22:35     ` Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7bc0918-a2bf-f6af-e8d8-13dc65c9ffee@redhat.com \
    --to=law@redhat.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).