+Fri Mar 22 12:08:36 CET 2002 Jan Hubicka <jh@suse.cz>
+
+ * cfgcleanup.c (outgoing_edges_math): Fix condition; relax
+ frequencies match; avoid match on different loop depths.
+ (try_crossjump_to_bb): Kill tests that no longer brings time
+ savings.
+ * cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth
+ updating code.
+ (split_edge): Likewise.
+
+ * flow.c (update_life_info_in_dirty_blocks): Fix uninitialized
+ variable.
+
+ * Makefile.in (cfgrtl): Add insn-config.h depenendency.
+ * cfgrtl.c: Include insn-config.h
+ (split_block) Dirtify block in presence of conditional execution
+
2002-03-22 Richard Sandiford <rsandifo@redhat.com>
* config/mips/abi64.h (SETUP_INCOMING_VARARGS): Undefine.
function.h except.h $(GGC_H) $(TM_P_H)
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
- function.h except.h $(GGC_H) $(TM_P_H)
+ function.h except.h $(GGC_H) $(TM_P_H) insn-config.h
cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
hard-reg-set.h insn-config.h $(RECOG_H) $(GGC_H) $(TM_P_H)
cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
if (!bb2->succ
|| !bb2->succ->succ_next
- || bb1->succ->succ_next->succ_next
+ || bb2->succ->succ_next->succ_next
|| !any_condjump_p (bb2->end)
- || !onlyjump_p (bb1->end))
+ || !onlyjump_p (bb2->end))
+ return false;
+
+ /* Do not crossjump across loop boundaries. This is a temporary
+ workaround for the common scenario in which crossjumping results
+ in killing the duplicated loop condition, making bb-reorder rotate
+ the loop incorectly, leaving an extra unconditional jump inside
+ the loop.
+
+ This check should go away once bb-reorder knows how to duplicate
+ code in this case or rotate the loops to avoid this scenario. */
+ if (bb1->loop_depth != bb2->loop_depth)
return false;
b1 = BRANCH_EDGE (bb1);
/* Do not use f2 probability as f2 may be forwarded. */
prob2 = REG_BR_PROB_BASE - b2->probability;
- /* Fail if the difference in probabilities is
- greater than 5%. */
- if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 20)
+ /* Fail if the difference in probabilities is greater than 50%.
+ This rules out two well-predicted branches with opposite
+ outcomes. */
+ if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 5)
{
if (rtl_dump_file)
fprintf (rtl_dump_file,
#include "toplev.h"
#include "tm_p.h"
#include "obstack.h"
+#include "insn-config.h"
/* Stubs in case we don't have a return insn. */
#ifndef HAVE_return
propagate_block (new_bb, new_bb->global_live_at_start, NULL, NULL, 0);
COPY_REG_SET (bb->global_live_at_end,
new_bb->global_live_at_start);
+#ifdef HAVE_conditional_execution
+ /* In the presence of conditional execution we are not able to update
+ liveness precisely. */
+ if (reload_completed)
+ {
+ bb->flags |= BB_DIRTY;
+ new_bb->flags |= BB_DIRTY;
+ }
+#endif
}
return new_edge;
sbitmap update_life_blocks = sbitmap_alloc (n_basic_blocks);
int block_num;
int n = 0;
- int ndead;
+ int retval = 0;
sbitmap_zero (update_life_blocks);
for (block_num = 0; block_num < n_basic_blocks; block_num++)
}
if (n)
- ndead = update_life_info (update_life_blocks, extent, prop_flags);
+ retval = update_life_info (update_life_blocks, extent, prop_flags);
sbitmap_free (update_life_blocks);
- return ndead;
+ return retval;
}
/* Free the variables allocated by find_basic_blocks.