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]

[PATCH] Fix DCE cutoff for functions w/o a virtual PHI


For functions without a virtual PHI node our fallback memory DCE
implementation is still quadratic.  This is because we lazily
allocate the visited bitmap at virtual PHI nodes - oops.

Fixed, committed as obvious.

This cuts compile-time for rths testcase (checking and profiling enabled)
from 102.32s and
 alias stmt walking    :  33.92 (33%) usr
to 88.61s and
 alias stmt walking    :  22.38 (25%) usr
so the cut-off is still a bit high for the testcase (I have a patch
for this as well, but it's non-obvious magic number tweaking).

Richard.

2009-11-26  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dce.c (perform_tree_ssa_dce): Allocate visited bitmap.

Index: gcc/tree-ssa-dce.c
===================================================================
*** gcc/tree-ssa-dce.c	(revision 154670)
--- gcc/tree-ssa-dce.c	(working copy)
*************** perform_tree_ssa_dce (bool aggressive)
*** 1377,1382 ****
--- 1377,1383 ----
    longest_chain = 0;
    total_chain = 0;
    chain_ovfl = false;
+   visited = BITMAP_ALLOC (NULL);
    propagate_necessity (el);
    BITMAP_FREE (visited);
  


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