diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2005-10-31 13:38:05 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2005-10-31 13:38:05 +0000 |
commit | a56b5394f0419486583aef0de3ac6c71175486a8 (patch) | |
tree | eb48c8c24f0dc632faf243992ea0ffcd3898cc42 /gcc/tree-ssa-operands.c | |
parent | cd7ec127de787ff770410b2f7380a4acfbeae84c (diff) | |
download | gcc-a56b5394f0419486583aef0de3ac6c71175486a8.zip gcc-a56b5394f0419486583aef0de3ac6c71175486a8.tar.gz gcc-a56b5394f0419486583aef0de3ac6c71175486a8.tar.bz2 |
re PR tree-optimization/19097 (Quadratic behavior with many sets for the same register in VRP)
2005-10-31 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/19097
* tree-ssa-operands.c (correct_use_link): Don't look for modified stmts.
From-SVN: r106272
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 3084554..0247629 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -311,27 +311,12 @@ correct_use_link (use_operand_p ptr, tree stmt) prev = ptr->prev; if (prev) { - bool stmt_mod = true; - /* Find the first element which isn't a SAFE iterator, is in a different - stmt, and is not a modified stmt. That node is in the correct list, - see if we are too. */ - - while (stmt_mod) - { - while (prev->stmt == stmt || prev->stmt == NULL) - prev = prev->prev; - if (prev->use == NULL) - stmt_mod = false; - else - if ((stmt_mod = stmt_modified_p (prev->stmt))) - prev = prev->prev; - } + /* Find the root element, making sure we skip any safe iterators. */ + while (prev->use != NULL || prev->stmt == NULL) + prev = prev->prev; /* Get the ssa_name of the list the node is in. */ - if (prev->use == NULL) - root = prev->stmt; - else - root = *(prev->use); + root = prev->stmt; /* If it's the right list, simply return. */ if (root == *(ptr->use)) return; |