Commit 0a2ed1f1 by Jan Hubicka Committed by Jan Hubicka

cfgcleanup.c (outgoing_edges_math): Fix condition; relax frequencies match;…

cfgcleanup.c (outgoing_edges_math): Fix condition; relax frequencies match; avoid match on different loop depths.

	* 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

From-SVN: r51168
parent 4d72536e
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.
......
......@@ -1494,7 +1494,7 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
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 \
......
......@@ -1116,9 +1116,20 @@ outgoing_edges_match (mode, bb1, bb2)
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);
......@@ -1194,9 +1205,10 @@ outgoing_edges_match (mode, bb1, bb2)
/* 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,
......
......@@ -56,6 +56,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#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
......@@ -546,6 +547,15 @@ split_block (bb, insn)
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;
......
......@@ -764,7 +764,7 @@ update_life_info_in_dirty_blocks (extent, prop_flags)
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++)
......@@ -775,10 +775,10 @@ update_life_info_in_dirty_blocks (extent, prop_flags)
}
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment