Hi,
On Sun, Dec 01 2019, Jan Hubicka wrote:
> Hi,
> this patch fixes the problem with clearing bits and m_vr in inliner
> update we discussed earlier. I am not sure if
> dete_type_change_from_memory_writes needs the clear?
No, they don't. Since your rewrite of devirtualization, the jfunc
parameter of functions detect_type_change_from_memory_writes,
detect_type_change and detect_type_change_ssa is quite clearly
completely useless and should be removed (along with its description in
the comments).
I can remove them as a followup or feel free to do so.
Otherwise I believe we already discussed that this is the right thing to
do.
Martin
>
> Bootstrapped/regtested x86_64-linux, Martin, does it make sense?
>
> Honza
>
> * ipa-prop.c (ipa_set_jf_unknown): Do not clear bits and m_vr.
> (detect_type_change_from_memory_writes): Clear it here.
> Index: ipa-prop.c
> ===================================================================
> --- ipa-prop.c (revision 278877)
> +++ ipa-prop.c (working copy)
> @@ -512,8 +512,6 @@ static void
> ipa_set_jf_unknown (struct ipa_jump_func *jfunc)
> {
> jfunc->type = IPA_JF_UNKNOWN;
> - jfunc->bits = NULL;
> - jfunc->m_vr = NULL;
> }
>
> /* Set JFUNC to be a copy of another jmp (to be used by jump function
> @@ -819,6 +817,8 @@ detect_type_change_from_memory_writes (i
> return false;
>
> ipa_set_jf_unknown (jfunc);
> + jfunc->bits = NULL;
> + jfunc->m_vr = NULL;
> return true;
> }
>