diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-23 14:43:43 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-23 14:43:43 +0000 |
commit | 1a3c6423a47657cd5bd9e5b2c6a2099da37a8dd4 (patch) | |
tree | 918facd3588c8a0a2523741ee7503f7ec90dd1dd /gcc/ipa-split.c | |
parent | 23842667695c218a5f0a5c1a5e59f1c9a6ed463c (diff) | |
download | gcc-1a3c6423a47657cd5bd9e5b2c6a2099da37a8dd4.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184508 138bc75d-0d04-0410-961f-82ee72b054a4
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 124098ce669..cb35150ba8a 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 |