This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: remove expand_constant lang_hook (was [RFC] Migrate pointers to members to the middle end)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ollie Wild <aaw at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Sep 2007 19:58:10 -0700
- Subject: Re: PATCH: remove expand_constant lang_hook (was [RFC] Migrate pointers to members to the middle end)
- References: <65dd6fd50709241246p58477765l7e3d2fd01e15bbaa@mail.gmail.com>
Ollie Wild wrote:
> 2007-09-24 Ollie Wild <aaw@google.com>
>
> * varasm.c (compare_constant): Removed call to
> lang_hooks.expand_constant.
> (copy_constants): Removed call to lang_hooks.expand_constant.
> (compute_reloc_for_constant): Removed call to
> lang_hooks.expand_constant.
> (output_addressed_constants): Removed call to
> lang_hooks.expand_constant.
> (constructor_static_from_elts_p): Removed call to
> lang_hooks.expand_constant.
> (output_constant): Removed calls to lang_hooks.expand_constant.
> * langhooks.h (struct lang_hooks): Removed field expand_constant.
> * langhooks-def.h (lhd_return_tree): Removed.
> (LANG_HOOKS_EXPAND_CONSTANT): Removed.
> (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT.
> * langhooks.c (lhd_return_tree): Removed.
>
> 2007-09-24 Ollie Wild <aaw@google.com>
>
> * typeck2.c (digest_init): Call cplus_expand_constant after
> convert_for_initialization.
> * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
> * expr.c (cplus_expand_constant): Updated function description.
This is a nice optimization and makes the compiler simpler as well. I'd
not normally allow this in Stage 3, but it's a resubmission, so this is
OK for mainline.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713