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: [PATCH] Use aliases instead of separate copies for !DECL_ONE_ONLY C[12] ctors or D[12] dtors with identical bodies (PR c++/3187, take 3)


On Mon, Nov 16, 2009 at 9:41 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On Fri, Nov 13, 2009 at 09:04:23PM +0100, Jan Hubicka wrote:
>> Cgraph bits are OK then if you add the LTO support.
>
> Here is an updated patch with LTO bits and also making the complete
> cdtor to be the defined function and base cdtor be an alias to it.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux with lto.
>
> 2009-11-16 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?PR c++/3187
> ? ? ? ?* cgraph.h (struct cgraph_node): Add same_body and same_body_alias
> ? ? ? ?fields.
> ? ? ? ?(cgraph_same_body_alias, cgraph_remove_same_body_alias): New
> ? ? ? ?prototypes.
> ? ? ? ?* cgraphunit.c (cgraph_expand_function, cgraph_emit_thunks,
> ? ? ? ?cgraph_materialize_all_clones): Handle same_body aliases.
> ? ? ? ?* cgraph.c (cgraph_allocate_node): New function.
> ? ? ? ?(cgraph_create_node): Use it.
> ? ? ? ?(cgraph_node_for_decl, cgraph_node, cgraph_get_node,
> ? ? ? ?cgraph_node_for_asm, cgraph_remove_node): Handle same_body aliases.
> ? ? ? ?(cgraph_same_body_alias, cgraph_remove_same_body_alias): New
> ? ? ? ?functions.
> ? ? ? ?* lto-cgraph.c (lto_output_node): Stream out same_body aliases.
> ? ? ? ?(input_node): Stream in same_body aliases.
> ? ? ? ?* lto-symtab.c (lto_cgraph_replace_node): Clear node pointers
> ? ? ? ?for same_body aliases.
> ? ? ? ?(lto_symtab_merge_cgraph_nodes_1): Handle same_body aliases.
>
> ? ? ? ?* cp-tree.h (expand_or_defer_fn_1): New prototype.
> ? ? ? ?* decl2.c (cp_write_global_declarations): Mark as !DECL_EXTERNAL
> ? ? ? ?also all same_body aliases.
> ? ? ? ?* semantics.c (expand_or_defer_fn): Move most of the function
> ? ? ? ?except registering with cgraph to ...
> ? ? ? ?(expand_or_defer_fn_1): ... here. ?New function.
> ? ? ? ?* optimize.c: Include cgraph.h.
> ? ? ? ?(maybe_clone_body): If in charge parm is not used and both base
> ? ? ? ?and complete clones are created and are not comdat, tell cgraph
> ? ? ? ?they have the same body.
> ? ? ? ?* Make-lang.in (cp/optimize.o): Depend on $(CGRAPH_H).
>

This trigged:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42095

H.J.


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