Summary: | [4.0 Regression] g++ starts eating all the memory and the CPU | ||
---|---|---|---|
Product: | gcc | Reporter: | Pierre <pied> |
Component: | tree-optimization | Assignee: | Steven Bosscher <steven> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dberlin, gcc-bugs, mueller, pinskia |
Priority: | P2 | Keywords: | memory-hog |
Version: | 4.0.0 | ||
Target Milestone: | 4.0.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | 3.3.2 |
Known to fail: | 4.0.0 | Last reconfirmed: | 2005-02-10 19:15:22 |
Attachments: |
The prepocessed source
Partial revision of the problematic patch |
Description
Pierre
2005-02-10 18:02:44 UTC
Did you read <http://gcc.gnu.org/bugs.html>. We need the preprocessed source. Created attachment 8162 [details]
The prepocessed source
I'm sorry, really sorry !
I generated the file, but forget to send it :/
Ok, I can confirm this with the following options on powerpc-darwin (which means it is most likely a tree optimizator problem but I could be wrong). -fno-exceptions -fno-check-new -fno-common -O2 It worked in 3.3.2 so this is a regression. PRE is eating up a huge amount of memory. Reverting the following patch fixes the bug: 2005-01-14 Steven Bosscher <stevenb@suse.de> * tree-ssa-dce.c (visited_control_parents): New sbitmap to replace BB_VISITED uses. (find_obviously_necessary_stmts): Don't clear BB_VISITED. (propagate_necessity): Check the bitmap instead of BB_VISITED. (tree_dce_done): Free visited_control_parents. (perform_tree_ssa_dce): Allocate and clear it. * tree-ssa-pre.c (compute_antic_aux): Make non-recursive. (compute_antic): Iterate from here using a DFS. Use an sbitmap instead of BB_VISITED. Pinski is correct (i know because i told him that was the cause :P) It no longer converges (i suspect some strange bug in your logic). Before it converged in 2 iterations. I stopped it at 958 iterations because i was running out of memory. I'll look into it. Created attachment 8166 [details]
Partial revision of the problematic patch
I'm not sure what exactly is wrong here. I suggest we revert the parts of the
patch that are unrelated to BB_VISITED for now. This is what the attached
patch does. I'll test it and commit it if it passes.
Subject: Bug 19876 CVSROOT: /cvs/gcc Module name: gcc Changes by: steven@gcc.gnu.org 2005-02-11 21:52:39 Modified files: gcc : ChangeLog tree-ssa-pre.c Log message: PR tree-optimization/19876 Partially revert my change from 2005-01-14 * tree-ssa-pre.c (compute_antic_aux): Make recursive once again... (compute_antic): ...and remove the loop here. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7450&r2=2.7451 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.63&r2=2.64 Should be fixed now. Bash me if it is not. |