aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-02-23 14:43:43 +0000
committerJakub Jelinek <jakub@redhat.com>2012-02-23 14:43:43 +0000
commit4639b2f9e080f90588be8d9235bd2d985bf048ee (patch)
tree918facd3588c8a0a2523741ee7503f7ec90dd1dd /gcc/ipa-split.c
parentea13a6266ff66801f520d279dcd8995ee72b7e3f (diff)
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: https://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.c12
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