diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-05 15:42:30 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-05 15:42:30 +0000 |
commit | 82a67b2c3dd025d45b61bcf4eb9a590079d6b963 (patch) | |
tree | 532a1d6bef5e5f6807eb8923edc27006c580c3c2 /gcc/tree-ssa-pre.c | |
parent | 0fba986bca1041613c7898c0cd152edc46fa25fa (diff) | |
download | gcc-82a67b2c3dd025d45b61bcf4eb9a590079d6b963.tar.gz |
2007-11-05 Nick Clifton <nickc@redhat.com>
Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/32540
PR tree-optimization/33922
* doc/invoke.texi: Document PARAM_MAX_PARTIAL_ANTIC_LENGTH.
* tree-ssa-pre.c: Include params.h.
(compute_partial_antic_aux): Use PARAM_MAX_PARTIAL_ANTIC_LENGTH
to limit the maximum length of the PA set for a given block.
* Makefile.in: Add a dependency upon params.h for tree-ssa-pre.c
* params.def (PARAM_MAX_PARTIAL_ANTIC_LENGTH): New parameter.
* gcc.dg/tree-ssa/pr32540-1.c: New.
* gcc.dg/tree-ssa/pr32540-2.c: New.
* gcc.dg/tree-ssa/pr33922.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129901 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 620346789a5..59396fd09ce 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "cfgloop.h" #include "tree-ssa-sccvn.h" +#include "params.h" /* TODO: @@ -1839,6 +1840,7 @@ compute_partial_antic_aux (basic_block block, bitmap_set_t PA_OUT; edge e; edge_iterator ei; + unsigned long max_pa = PARAM_VALUE (PARAM_MAX_PARTIAL_ANTIC_LENGTH); old_PA_IN = PA_OUT = NULL; @@ -1847,6 +1849,14 @@ compute_partial_antic_aux (basic_block block, if (block_has_abnormal_pred_edge) goto maybe_dump_sets; + /* If there are too many partially anticipatable values in the + block, phi_translate_set can take an exponential time: stop + before the translation starts. */ + if (max_pa + && single_succ_p (block) + && bitmap_count_bits (PA_IN (single_succ (block))->values) > max_pa) + goto maybe_dump_sets; + old_PA_IN = PA_IN (block); PA_OUT = bitmap_set_new (); |