/* Control flow graph building code for GNU compiler.
- Copyright (C) 1987-2014 Free Software Foundation, Inc.
+ Copyright (C) 1987-2016 Free Software Foundation, Inc.
This file is part of GCC.
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
+#include "backend.h"
#include "rtl.h"
-#include "hard-reg-set.h"
-#include "basic-block.h"
-#include "regs.h"
-#include "flags.h"
-#include "function.h"
+#include "cfghooks.h"
+#include "emit-rtl.h"
+#include "cfgrtl.h"
+#include "cfganal.h"
+#include "cfgbuild.h"
#include "except.h"
-#include "expr.h"
-#include "diagnostic-core.h"
-#include "timevar.h"
-#include "sbitmap.h"
+#include "stmt.h"
static void make_edges (basic_block, basic_block, int);
static void make_label_edge (sbitmap, basic_block, rtx, int);
block. */
bool
-inside_basic_block_p (const_rtx insn)
+inside_basic_block_p (const rtx_insn *insn)
{
switch (GET_CODE (insn))
{
the basic block. */
bool
-control_flow_insn_p (const_rtx insn)
+control_flow_insn_p (const rtx_insn *insn)
{
switch (GET_CODE (insn))
{
if (lp)
{
- rtx label = lp->landing_pad;
+ rtx_insn *label = lp->landing_pad;
/* During initial rtl generation, use the post_landing_pad. */
if (label == NULL)
&& GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
&& GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
make_label_edge (edge_cache, bb,
- XEXP (XEXP (SET_SRC (tmp), 2), 0), 0);
+ LABEL_REF_LABEL (XEXP (SET_SRC (tmp), 2)), 0);
}
/* If this is a computed jump, then mark it as reaching
everything on the forced_labels list. */
else if (computed_jump_p (insn))
{
- for (rtx_expr_list *x = forced_labels; x; x = x->next ())
- make_label_edge (edge_cache, bb, x->element (), EDGE_ABNORMAL);
+ for (rtx_insn_list *x = forced_labels; x; x = x->next ())
+ make_label_edge (edge_cache, bb, x->insn (), EDGE_ABNORMAL);
}
/* Returns create an exit out. */
taken, then only calls to those functions or to other
nested functions that use them could possibly do
nonlocal gotos. */
- for (rtx x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
- make_label_edge (edge_cache, bb, XEXP (x, 0),
+ for (rtx_insn_list *x = nonlocal_goto_handler_labels;
+ x;
+ x = x->next ())
+ make_label_edge (edge_cache, bb, x->insn (),
EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
}
&& SET_DEST (tmp) == pc_rtx
&& GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
&& GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
- mark_tablejump_edge (XEXP (XEXP (SET_SRC (tmp), 2), 0));
+ mark_tablejump_edge (LABEL_REF_LABEL (XEXP (SET_SRC (tmp), 2)));
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{