From feb265abdb7bce4cb67733dc1c1c96644e6f790f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 15 Nov 2001 11:41:48 +0100 Subject: cfgcleanup.c (try_optimize_cfg): If try_simplify_condjump optimized conditional jump... * cfgcleanup.c (try_optimize_cfg): If try_simplify_condjump optimized conditional jump, request updating life into for the block containing it. Fix a typo which prevented life info update. Clear blocks bitmap before using it. * gcc.c-torture/compile/20011114-3.c: New test. From-SVN: r47050 --- gcc/cfgcleanup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/cfgcleanup.c') diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 03f767a..28f3a1f 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1211,7 +1211,10 @@ try_optimize_cfg (mode) /* Simplify branch over branch. */ if ((mode & CLEANUP_EXPENSIVE) && try_simplify_condjump (b)) - changed_here = true; + { + BB_SET_FLAG (b, BB_UPDATE_LIFE); + changed_here = true; + } /* If B has a single outgoing edge, but uses a non-trivial jump instruction without side-effects, we can either delete the @@ -1261,10 +1264,11 @@ try_optimize_cfg (mode) if (mode & CLEANUP_CROSSJUMP) remove_fake_edges (); - if ((mode & CLEANUP_UPDATE_LIFE) & changed_overall) + if ((mode & CLEANUP_UPDATE_LIFE) && changed_overall) { bool found = 0; blocks = sbitmap_alloc (n_basic_blocks); + sbitmap_zero (blocks); for (i = 0; i < n_basic_blocks; i++) if (BB_FLAGS (BASIC_BLOCK (i)) & BB_UPDATE_LIFE) { -- cgit v1.1