diff options
author | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-29 14:06:31 +0000 |
---|---|---|
committer | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-29 14:06:31 +0000 |
commit | c9722991b753c63015b2935a8f464be49f6f26dd (patch) | |
tree | 482d5aeb899b764a997afc5a665f64dbbb61b567 /gcc/graphite-scop-detection.c | |
parent | 0f41df2b6ba9f39951b13926e429090034b4ebb9 (diff) | |
download | gcc-c9722991b753c63015b2935a8f464be49f6f26dd.tar.gz |
2011-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* graphite-scop-detection.c (make_close_phi_nodes_unique): New
forward declaration.
(remove_duplicate_close_phi): Detect and repair creation of
duplicate close-phis for a containing loop.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179351 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r-- | gcc/graphite-scop-detection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 346056899d3..e8370ef4e5a 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -36,6 +36,9 @@ along with GCC; see the file COPYING3. If not see #include "graphite-poly.h" #include "graphite-scop-detection.h" +/* Forward declarations. */ +static void make_close_phi_nodes_unique (basic_block); + /* The type of the analyzed basic block. */ typedef enum gbb_type { @@ -1231,6 +1234,13 @@ remove_duplicate_close_phi (gimple phi, gimple_stmt_iterator *gsi) SET_USE (use_p, res); update_stmt (use_stmt); + + /* It is possible that we just created a duplicate close-phi + for an already-processed containing loop. Check for this + case and clean it up. */ + if (gimple_code (use_stmt) == GIMPLE_PHI + && gimple_phi_num_args (use_stmt) == 1) + make_close_phi_nodes_unique (gimple_bb (use_stmt)); } remove_phi_node (gsi, true); |