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]

Fix non-SSA inlining


Hi,
this patch fixed miscompilation of stage-feedback in profiledbootstrap
caused by non-SSA inliner forgetting to output initialization
statements.

Bootstrapped/regtested i686-linux, comitted.

HOnza
	* tree-inline.c (insert_init_stmt): Insert sequence even when
	not in SSA form.
Index: tree-inline.c
===================================================================
*** tree-inline.c	(revision 139772)
--- tree-inline.c	(working copy)
*************** insert_init_stmt (basic_block bb, gimple
*** 1868,1881 ****
    i = gsi_start (seq);
    gimple_regimplify_operands (init_stmt, &i);
  
!   if (gimple_in_ssa_p (cfun)
!       && init_stmt
        && !gimple_seq_empty_p (seq))
      {
        /* The replacement can expose previously unreferenced
  	 variables.  */
!       for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
! 	find_new_referenced_vars (gsi_stmt (i));
  
        /* Insert the gimplified sequence needed for INIT_STMT
  	 after SI.  INIT_STMT will be inserted after SEQ.  */
--- 1868,1881 ----
    i = gsi_start (seq);
    gimple_regimplify_operands (init_stmt, &i);
  
!   if (init_stmt
        && !gimple_seq_empty_p (seq))
      {
        /* The replacement can expose previously unreferenced
  	 variables.  */
!       if (gimple_in_ssa_p (cfun))
!         for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
! 	  find_new_referenced_vars (gsi_stmt (i));
  
        /* Insert the gimplified sequence needed for INIT_STMT
  	 after SI.  INIT_STMT will be inserted after SEQ.  */


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