[PATCH] More PR56150 slow compile-time fixes

Richard Biener rguenther@suse.de
Thu Jan 31 08:54:00 GMT 2013


This reverts the change to go into loop-closed SSA form for
virtual operands.  Nothing relys on that and the verifier doesn't
verify it works.  Furthermore SSA updating will destroy loop-closed
virtual SSA form very quickly.  As the PR shows it can be quite
costly to go into loop-closed SSA form for virtuals (50% of
compile-time).

So the following patch reverts the change for now.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2013-01-31  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56150
	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not
	visit virtual operands.
	(find_uses_to_rename_bb): Likewise.

Index: gcc/tree-ssa-loop-manip.c
===================================================================
*** gcc/tree-ssa-loop-manip.c	(revision 195574)
--- gcc/tree-ssa-loop-manip.c	(working copy)
*************** find_uses_to_rename_stmt (gimple stmt, b
*** 402,408 ****
    if (is_gimple_debug (stmt))
      return;
  
!   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
      find_uses_to_rename_use (bb, var, use_blocks, need_phis);
  }
  
--- 402,408 ----
    if (is_gimple_debug (stmt))
      return;
  
!   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE)
      find_uses_to_rename_use (bb, var, use_blocks, need_phis);
  }
  
*************** find_uses_to_rename_bb (basic_block bb,
*** 422,429 ****
      for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi))
        {
          gimple phi = gsi_stmt (bsi);
! 	find_uses_to_rename_use (bb, PHI_ARG_DEF_FROM_EDGE (phi, e),
! 				 use_blocks, need_phis);
        }
  
    for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
--- 422,430 ----
      for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi))
        {
          gimple phi = gsi_stmt (bsi);
! 	if (! virtual_operand_p (gimple_phi_result (phi)))
! 	  find_uses_to_rename_use (bb, PHI_ARG_DEF_FROM_EDGE (phi, e),
! 				   use_blocks, need_phis);
        }
  
    for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))



More information about the Gcc-patches mailing list