diff mbox series

Fix jump function update in inliner

Message ID 20191201151549.justeyetbjpgfm6z@kam.mff.cuni.cz
State New
Headers show
Series Fix jump function update in inliner | expand

Commit Message

Jan Hubicka Dec. 1, 2019, 3:15 p.m. UTC
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?

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.

Comments

Martin Jambor Dec. 2, 2019, 3:07 p.m. UTC | #1
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;
>  }
>
diff mbox series

Patch

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;
 }