This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not store/stream binfos in jump functions
Hi,
On Fri, Sep 16, 2011 at 04:29:44PM +0200, Jan Hubicka wrote:
> >
> > * ipa-prop.h (jump_func_type): Updated comments.
> > (ipa_known_type_data): New type.
> > (ipa_jump_func): Use it to describe known type jump functions.
> > * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Updated to
> > reflect the new known type jump function contents.
> > (compute_known_type_jump_func): Likewise.
> > (combine_known_type_and_ancestor_jfs): Likewise.
> > (try_make_edge_direct_virtual_call): Likewise.
> > (ipa_write_jump_function): Likewise.
> > (ipa_read_jump_function): Likewise.
> > * ipa-cp.c (ipa_value_from_known_type_jfunc): New function.
> > (ipa_value_from_jfunc): Use ipa_value_from_known_type_jfunc.
> > (propagate_accross_jump_function): Likewise.
>
> OK. If we saved just one pointer to the actual type (i.e. not
> BINFO), would it be any sanier?
I'm not sure if I understand the question. In any event, the
base_type is certainly not enough, the offset is 100% necessary - it
identifies the vptr in the structure which we have to know because the
indices (tokens) in OBJ_TYPE_REFs are relative to what that vptr, not
the first vptr, points to.
I have attempted to remove the component_type (which means to remove
the expected_type in get_binfo_at_offset) but my first simple attempts
could lead to missed optimizations in cases we can currently handle.
I still have one idea that might work, I will try.
Meanwhile, I will re-test the patch on a current svn checkout and
commit it if all goes fine.
Thanks,
Martin