aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-pre.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-12-13 14:22:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-12-13 14:22:23 +0000
commit863d2a5760cc1e9c2e64ab97c471cd37b7e254ca (patch)
treee093a6851a7defde4e02f4c80a5cdb3acacf2c70 /gcc/tree-ssa-pre.c
parent3905a1b25a31c60a66b3736af9c71bc3cad8cdc2 (diff)
downloadgcc-863d2a5760cc1e9c2e64ab97c471cd37b7e254ca.zip
gcc-863d2a5760cc1e9c2e64ab97c471cd37b7e254ca.tar.gz
gcc-863d2a5760cc1e9c2e64ab97c471cd37b7e254ca.tar.bz2
re PR middle-end/34450 (compile takes up 1.8 GB RAM at -O1)
2007-12-13 Richard Guenther <rguenther@suse.de> PR tree-optimization/34450 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): New param. * invoke.texi (sccvn-max-scc-size): Document. * Makefile.in (tree-ssa-sccvn.o): Add $(PARAMS_H) dependency. * tree-ssa-sccvn.h (run_scc_vn): Return true on success, false on error. * tree-ssa-sccvn.c (params.h): Include. (DFS): Return true if all went well, return false as soon as a SCC exceeds the size of PARAM_SCCVN_MAX_SCC_SIZE. (run_scc_vn): Return true if all went well, return false if we aborted during DFS. * tree-ssa-pre.c (execute_pre): Check if SCCVN finished successfully, otherwise bail out. From-SVN: r130895
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r--gcc/tree-ssa-pre.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 59396fd..c947e0f 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3933,7 +3933,13 @@ execute_pre (bool do_fre)
insert_fake_stores ();
/* Collect and value number expressions computed in each basic block. */
- run_scc_vn ();
+ if (!run_scc_vn ())
+ {
+ if (!do_fre)
+ remove_dead_inserted_code ();
+ fini_pre ();
+ return;
+ }
switch_to_PRE_table ();
compute_avail ();