Hi,

On Thu, Aug 22, 2013 at 05:33:50PM +0200, Jan Hubicka wrote:
> Hi,
> this problem was noticed by my verifier that binfo walks are not across type
> hiearchy. ipa_intraprocedural_devirtualization is one remaining place where we
> take class of object from OBJ_TYPE_REF_OBJECT instead of
> obj_type_ref_class_type.
> 
> Unforutnately I noticed that this problem is propagated quite further across 
> ipa-prop
> design.  We assume that types of pointers taken from gimple call arguments
> are types of pointers to classes pass down to the callee.  This is not true
> after propagation.
> 
> I did not fix the all places, only places needed to get parameter
> for ipa_set_jf_known_type and detect_type_change_ssa right.  Also I
> modified ipa_set_jf_known_type to not record non-polymorphic
> type. It is a waste of memory and LTO streaming bandwidth.
> 
> Bootstrapped/regtesed x86_64-linux. Martin, please can you review the change?
> 
>       * ipa-prop.c (ipa_set_jf_known_type): Check that component type
>       is a record type with BINFO.
>       (detect_type_change_ssa):  Add comp_type argument.
>       (compute_complex_assign_jump_func): Add param_type argument; pass
>       it down to detect_type_change_ssa.
>       (compute_known_type_jump_func): Add expected_type parameter.
>       Do not bother tracking a non-polymorphic type.
>       (ipa_get_callee_param_type): New function.
>       (ipa_compute_jump_functions_for_edge): Pass down calle parm types.
>       (ipa_analyze_virtual_call_uses): Use class typee as argument
>       of detect_type_change_1.
>       (ipa_intraprocedural_devirtualization): Pass down class type.

Hopefully I'll get rid of the component_types in the jump functions
and most of this won't be necesary.  Meanwhile, this is OK.

Thanks,

Martin

Reply via email to