/* Instruction scheduling pass. Log dumping infrastructure.
- Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This file is part of GCC.
#include "insn-config.h"
#include "insn-attr.h"
#include "params.h"
-#include "output.h"
#include "basic-block.h"
#include "cselib.h"
#include "target.h"
/* Functions for dumping instructions, av sets, and exprs. */
/* Default flags for dumping insns. */
-static int dump_insn_rtx_flags = DUMP_INSN_RTX_PATTERN;
+static int dump_insn_rtx_flags = DUMP_INSN_RTX_UID | DUMP_INSN_RTX_PATTERN;
/* Default flags for dumping vinsns. */
static int dump_vinsn_flags = (DUMP_VINSN_INSN_RTX | DUMP_VINSN_TYPE
sel_print ("%d;", INSN_UID (insn));
if (flags & DUMP_INSN_RTX_PATTERN)
- {
- char buf[2048];
-
- print_insn (buf, insn, 0);
- sel_print ("%s;", buf);
- }
+ sel_print ("%s;", str_pattern_slim (PATTERN (insn)));
if (flags & DUMP_INSN_RTX_BBN)
{
int i;
rtx succ;
- FOR_EACH_VEC_ELT (rtx, succs, i, succ)
+ FOR_EACH_VEC_ELT (succs, i, succ)
if (succ)
dump_insn (succ);
else
/* '+' before insn means it is a new cycle start and it's not been
scheduled yet. '>' - has been scheduled. */
- if (s_i_d && INSN_LUID (insn) > 0)
+ if (s_i_d.exists () && INSN_LUID (insn) > 0)
if (GET_MODE (insn) == TImode)
sprintf (buf, "%s %4d",
INSN_SCHED_TIMES (insn) > 0 ? "> " : "< ",
\f
/* Functions for pretty printing of CFG. */
+/* FIXME: Using pretty-print here could simplify this stuff. */
/* Replace all occurencies of STR1 to STR2 in BUF.
The BUF must be large enough to hold the result. */
while (p);
}
-/* Replace characters in BUF that have special meaning in .dot file. */
+/* Replace characters in BUF that have special meaning in .dot file.
+ Similar to pp_write_text_as_dot_label_to_stream. */
static void
sel_prepare_string_for_dot_label (char *buf)
{
{
int insn_flags = DUMP_INSN_UID | DUMP_INSN_PATTERN;
- if (sched_luids != NULL && INSN_LUID (insn) > 0)
+ if (sched_luids.exists () && INSN_LUID (insn) > 0)
{
if (flags & SEL_DUMP_CFG_INSN_SEQNO)
insn_flags |= DUMP_INSN_SEQNO | DUMP_INSN_SCHED_CYCLE | DUMP_INSN_EXPR;
enum machine_mode address_mode;
gcc_assert (MEM_P (x));
- address_mode = targetm.addr_space.address_mode (MEM_ADDR_SPACE (x));
+ address_mode = get_address_mode (x);
t = shallow_copy_rtx (x);
if (cselib_lookup (XEXP (t, 0), address_mode, 0, GET_MODE (t)))