/* Print RTL for GCC.
- Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ Copyright (C) 1987-2020 Free Software Foundation, Inc.
This file is part of GCC.
#include "alias.h"
#include "tree.h"
#include "basic-block.h"
-#include "cfg.h"
#include "print-tree.h"
#include "flags.h"
#include "predict.h"
#include "function.h"
+#include "cfg.h"
#include "basic-block.h"
#include "diagnostic.h"
#include "tree-pretty-print.h"
#include "print-rtl.h"
#include "rtl-iter.h"
+/* Disable warnings about quoting issues in the pp_xxx calls below
+ that (intentionally) don't follow GCC diagnostic conventions. */
+#if __GNUC__ >= 10
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-diag"
+#endif
+
/* String printed at beginning of each RTL when it is dumped.
This string is set to ASM_COMMENT_START when the RTL is dumped in
the assembly output file. */
}
case NOTE_INSN_VAR_LOCATION:
- case NOTE_INSN_CALL_ARG_LOCATION:
fputc (' ', m_outfile);
print_rtx (NOTE_VAR_LOCATION (in_rtx));
break;
break;
case NOTE_INSN_BEGIN_STMT:
+ case NOTE_INSN_INLINE_ENTRY:
#ifndef GENERATOR_FILE
{
expanded_location xloc
m_sawclose = 1;
for (int j = 0; j < XVECLEN (in_rtx, idx); j++)
- print_rtx (XVECEXP (in_rtx, idx, j));
+ {
+ int j1;
+
+ print_rtx (XVECEXP (in_rtx, idx, j));
+ for (j1 = j + 1; j1 < XVECLEN (in_rtx, idx); j1++)
+ if (XVECEXP (in_rtx, idx, j) != XVECEXP (in_rtx, idx, j1))
+ break;
+
+ if (j1 != j + 1)
+ {
+ fprintf (m_outfile, " repeated x%i", j1 - j);
+ j = j1 - 1;
+ }
+ }
m_indent -= 2;
}
if (INSN_HAS_LOCATION (in_insn))
{
expanded_location xloc = insn_location (in_insn);
- fprintf (m_outfile, " \"%s\":%i", xloc.file, xloc.line);
+ fprintf (m_outfile, " \"%s\":%i:%i", xloc.file, xloc.line,
+ xloc.column);
}
#endif
}
pp_string (pp, tmp);
break;
case CONST_STRING:
- pp_printf (pp, "\"%s\"", XSTR (x, 0));
+ pp_string (pp, "\"");
+ pretty_print_string (pp, XSTR (x, 0), strlen (XSTR (x, 0)));
+ pp_string (pp, "\"");
break;
case SYMBOL_REF:
pp_printf (pp, "`%s'", XSTR (x, 0));
gcc_assert (strlen (print_rtx_head) < sizeof (indented_print_rtx_head) - 4);
snprintf (indented_print_rtx_head,
sizeof (indented_print_rtx_head),
- "%s ", print_rtx_head);
+ "%s ", print_rtx_head);
print_rtx_head = indented_print_rtx_head;
for (int i = 0; i < seq->len (); i++)
print_insn_with_notes (pp, seq->insn (i));
pp_string (pp, "debug begin stmt marker");
break;
+ case NOTE_INSN_INLINE_ENTRY:
+ pp_string (pp, "debug inline entry marker");
+ break;
+
default:
gcc_unreachable ();
}
break;
case NOTE_INSN_VAR_LOCATION:
- case NOTE_INSN_CALL_ARG_LOCATION:
pp_left_brace (pp);
print_pattern (pp, NOTE_VAR_LOCATION (x), verbose);
pp_right_brace (pp);
}
#endif
+
+#if __GNUC__ >= 10
+# pragma GCC diagnostic pop
+#endif