diff options
author | Richard Guenther <rguenther@suse.de> | 2010-03-15 13:18:45 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-03-15 13:18:45 +0000 |
commit | 610b64e2a274bb1021ee5891fd68e8b2f95e7c1d (patch) | |
tree | 6b9d86bc43851d80373cb7adff8e1d0cfacfdb8f /gcc/tree-cfg.c | |
parent | 610de68dbe2c55bad224111693e12cdb00aa87b8 (diff) | |
download | gcc-610b64e2a274bb1021ee5891fd68e8b2f95e7c1d.zip gcc-610b64e2a274bb1021ee5891fd68e8b2f95e7c1d.tar.gz gcc-610b64e2a274bb1021ee5891fd68e8b2f95e7c1d.tar.bz2 |
re PR tree-optimization/43367 (ice: in may_propagate_copy, at tree-ssa-copy.c:85)
2010-03-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43367
* tree-cfg.c (gimple_can_merge_blocks_p): Simplify PHI
elimination check.
* gcc.c-torture/compile/pr43367.c: New testcase.
From-SVN: r157458
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e5ed9ec..6f4e416 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1438,27 +1438,12 @@ gimple_can_merge_blocks_p (basic_block a, basic_block b) return false; /* It must be possible to eliminate all phi nodes in B. If ssa form - is not up-to-date, we cannot eliminate any phis; however, if only - some symbols as whole are marked for renaming, this is not a problem, - as phi nodes for those symbols are irrelevant in updating anyway. */ + is not up-to-date and a name-mapping is registered, we cannot eliminate + any phis. Symbols marked for renaming are never a problem though. */ phis = phi_nodes (b); - if (!gimple_seq_empty_p (phis)) - { - gimple_stmt_iterator i; - - if (name_mappings_registered_p ()) - return false; - - for (i = gsi_start (phis); !gsi_end_p (i); gsi_next (&i)) - { - gimple phi = gsi_stmt (i); - - if (!is_gimple_reg (gimple_phi_result (phi)) - && !may_propagate_copy (gimple_phi_result (phi), - gimple_phi_arg_def (phi, 0))) - return false; - } - } + if (!gimple_seq_empty_p (phis) + && name_mappings_registered_p ()) + return false; return true; } |