/* Control flow graph manipulation code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
#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
/* User declared labels must be preserved. */
&& LABEL_NAME (label) == 0
&& !in_expr_list_p (forced_labels, label)
- && !in_expr_list_p (label_value_list, label)
- && !in_expr_list_p (exception_handler_labels, label));
+ && !in_expr_list_p (label_value_list, label));
}
/* Delete INSN by patching it out. Return the next insn. */
to post-process the stream to remove empty blocks, loops, ranges, etc. */
int
-flow_delete_block (b)
+flow_delete_block_noexpunge (b)
basic_block b;
{
int deleted_handler = 0;
b->pred = NULL;
b->succ = NULL;
+ return deleted_handler;
+}
+
+int
+flow_delete_block (b)
+ basic_block b;
+{
+ int deleted_handler = flow_delete_block_noexpunge (b);
+
/* Remove the basic block from the array, and compact behind it. */
expunge_block (b);
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;
rtx x;
for (x = a_end; x != b_end; x = NEXT_INSN (x))
- BLOCK_FOR_INSN (x) = a;
+ set_block_for_insn (x, a);
- BLOCK_FOR_INSN (b_end) = a;
+ set_block_for_insn (b_end, a);
}
a_end = b_end;
rtx note;
if (INSN_P (bb->end)
- && (note = find_reg_note (bb->end, REG_BR_PROB, NULL_RTX)))
+ && (note = find_reg_note (bb->end, REG_BR_PROB, NULL_RTX))
+ && any_condjump_p (bb->end))
{
- if (!any_condjump_p (bb->end))
- {
- error ("verify_flow_info: REG_BR_PROB on non-condjump",
- bb->index);
- err = 1;
- }
if (INTVAL (XEXP (note, 0)) != BRANCH_EDGE (bb)->probability)
{
error ("verify_flow_info: REG_BR_PROB does not match cfg %i %i",