[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-21 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2007-11-21 10:16 ---
Subject: Bug 34148

Author: rguenth
Date: Wed Nov 21 10:16:21 2007
New Revision: 130329

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=130329
Log:
2007-11-21  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/34148
* tree-ssa-structalias.c (create_variable_info_for): Do not use
field-sensitive PTA for single-element structures.
* tree-ssa-alias.c (create_overlap_variables_for): Do not create
SFTs for single-element structures.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-structalias.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-21 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2007-11-21 12:01 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-20 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2007-11-20 12:20 ---
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01046.html fixes the miscompile
of the C++ frontend.

-fno-strict-aliasing makes the testcase consume a lot more memory than
-fstrict-aliasing.  Which is why -O is also a lot worse than -O2.

What one can also notice is that we create lots of unpartitionable SFTs for
structures with just _one_ SFT -- we should not need to create SFTs for those
at all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-20 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2007-11-20 12:21 ---
Created an attachment (id=14585)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14585action=view)
worse testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-19 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2007-11-19 10:51 ---
Created an attachment (id=14577)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14577action=view)
testcase (unreduced)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-19 Thread steven at gcc dot gnu dot org


--- Comment #2 from steven at gcc dot gnu dot org  2007-11-19 11:05 ---
tree-ssa-sccvn should use a non-recursive DFS algorithm.  Though, that is only
part of the solution here, I suppose.


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dberlin at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-11-19 11:05:38
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-19 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2007-11-19 11:19 ---
Yes, I wonder if we can cut the DFS walk somewhere - in this case we have
1000s of stmts with each ~200 VUSEs...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-19 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2007-11-19 11:23 ---
One workaround in this case is to run another forwprop / dce between inlining
and the first alias pass.  This get's rid of a lot of pointers and pointed
to temporaries.  Still that doesn't address the fundamental problems here.
(but it makes the testcase work nicely within a bound of 600MB peak
memory usage)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148



[Bug tree-optimization/34148] [4.3 Regression] Too many VOPs, too deep tree-ssa-sccvn.c recursion

2007-11-19 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2007-11-19 17:38 ---
With just a forwprop pass after inlining and before salias we miscompile
cp/semantics.c:pop_to_parent_deferring_access_checks() at -O2.
An optimization barrier like

pop_to_parent_deferring_access_checks (void)
{
  if (deferred_access_no_check)
deferred_access_no_check--; 
  else
{
  VEC (deferred_access_check,gc) *checks;
  deferred_access *ptr;

  checks = (VEC_last (deferred_access, deferred_access_stack)
-deferred_access_checks);

  VEC_pop (deferred_access, deferred_access_stack);
__asm__ __volatile__ ( : : : memory);
  ptr = VEC_last (deferred_access, deferred_access_stack);

fixes it.  Reducing max-aliased-vops to 100 (as with -O1 which also passes)
fixes the problem as well.  -O1 -fstrict-aliasing
--param max-aliased-vops=500 (as with -O2) also breaks.  Disabling DOM
makes it work again.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34148