diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-02-23 15:43:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-02-23 15:43:43 +0100 |
commit | a348dc7ff9f28f7ac5ba4688b0c532b6710acb9b (patch) | |
tree | 918facd3588c8a0a2523741ee7503f7ec90dd1dd /gcc/ipa-split.c | |
parent | 3762c343865620e03f47987d181095efd936f6f9 (diff) | |
download | gcc-a348dc7ff9f28f7ac5ba4688b0c532b6710acb9b.zip gcc-a348dc7ff9f28f7ac5ba4688b0c532b6710acb9b.tar.gz gcc-a348dc7ff9f28f7ac5ba4688b0c532b6710acb9b.tar.bz2 |
re PR tree-optimization/52019 (tree-ssa/ipa-split-5.c fails with -fno-tree-sra because of CLOBBERS)
PR tree-optimization/52019
* ipa-split.c (find_return_bb, find_retval, visit_bb): Ignore
CLOBBER stmts.
* gcc.dg/tree-ssa/ipa-split-6.c: New test.
From-SVN: r184508
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 124098ce..cb35150 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1,5 +1,5 @@ /* Function splitting pass - Copyright (C) 2010, 2011 + Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Jan Hubicka <jh@suse.cz> @@ -624,7 +624,9 @@ find_return_bb (void) for (bsi = gsi_last_bb (e->src); !gsi_end_p (bsi); gsi_prev (&bsi)) { gimple stmt = gsi_stmt (bsi); - if (gimple_code (stmt) == GIMPLE_LABEL || is_gimple_debug (stmt)) + if (gimple_code (stmt) == GIMPLE_LABEL + || is_gimple_debug (stmt) + || gimple_clobber_p (stmt)) ; else if (gimple_code (stmt) == GIMPLE_ASSIGN && found_return @@ -657,7 +659,8 @@ find_retval (basic_block return_bb) for (bsi = gsi_start_bb (return_bb); !gsi_end_p (bsi); gsi_next (&bsi)) if (gimple_code (gsi_stmt (bsi)) == GIMPLE_RETURN) return gimple_return_retval (gsi_stmt (bsi)); - else if (gimple_code (gsi_stmt (bsi)) == GIMPLE_ASSIGN) + else if (gimple_code (gsi_stmt (bsi)) == GIMPLE_ASSIGN + && !gimple_clobber_p (gsi_stmt (bsi))) return gimple_assign_rhs1 (gsi_stmt (bsi)); return NULL; } @@ -733,6 +736,9 @@ visit_bb (basic_block bb, basic_block return_bb, if (is_gimple_debug (stmt)) continue; + if (gimple_clobber_p (stmt)) + continue; + /* FIXME: We can split regions containing EH. We can not however split RESX, EH_DISPATCH and EH_POINTER referring to same region into different partitions. This would require tracking of |