aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-06-30 16:56:37 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-06-30 14:56:37 +0000
commit2de58650f962e371b06f00bdefd0b01b5f7e3f6a (patch)
treeb0873a32071a823e01701ec13011a3c5038ec083 /gcc/tree-cfg.c
parent46db44ccaea515d561f7a63d0e07ee6ddbc1b869 (diff)
downloadgcc-2de58650f962e371b06f00bdefd0b01b5f7e3f6a.zip
gcc-2de58650f962e371b06f00bdefd0b01b5f7e3f6a.tar.gz
gcc-2de58650f962e371b06f00bdefd0b01b5f7e3f6a.tar.bz2
cfgloopanal.c (check_irred): Move into ...
* cfgloopanal.c (check_irred): Move into ... (mark_irreducible_loops): ... here; return true if ireducible loops was found. * ipa-pure-const.c: Include cfgloop.h and tree-scalar-evolution.h (analyze_function): Try to prove loop finiteness. * cfgloop.h (mark_irreducible_loops): Update prototype. * Makefile.in (ipa-pure-const.o): Add dependency on SCEV and CFGLOOP. From-SVN: r149101
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 4c7c0db..049dd1d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5131,8 +5131,17 @@ gimple_move_block_after (basic_block bb, basic_block after)
/* Return true if basic_block can be duplicated. */
static bool
-gimple_can_duplicate_bb_p (const_basic_block bb ATTRIBUTE_UNUSED)
+gimple_can_duplicate_bb_p (const_basic_block bb)
{
+ gimple_stmt_iterator gsi = gsi_last_bb (bb);
+
+ /* RTL expander has quite artificial limitation to at most one RESX instruction
+ per region. It can be fixed by turning 1-1 map to 1-many map, but since the
+ code needs to be rewritten to gimple level lowering and there is little reason
+ for duplicating RESX instructions in order to optimize code performance, we
+ just disallow it for the moment. */
+ if (!gsi_end_p (gsi) && gimple_code (gsi_stmt (gsi)) == GIMPLE_RESX)
+ return false;
return true;
}