aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-10-26 18:25:14 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-10-26 18:25:14 +0000
commit7574cfd44c1f73e2083c525e1a79ab716f7a994b (patch)
tree7a4e43895ef2a596be72dfbe2ecda75d47f6b056 /gcc/print-rtl.c
parenta0019047b8acbda653ba0b250940fe29fca38a6e (diff)
downloadgcc-7574cfd44c1f73e2083c525e1a79ab716f7a994b.zip
gcc-7574cfd44c1f73e2083c525e1a79ab716f7a994b.tar.gz
gcc-7574cfd44c1f73e2083c525e1a79ab716f7a994b.tar.bz2
Show INSN_UIDs in compact mode
gcc/ChangeLog: * print-rtl.c (rtx_writer::print_rtx_operand_code_u): Print INSN_UIDs for all insns in compact mode. (rtx_writer::print_rtx): Likewise. * print-rtl.h (rtx_writer::flag_compact): Update comment. * rtl-tests.c (selftest::test_dumping_insns): Update expected output to include INSN_UID. (selftest::test_uncond_jump): Likewise. From-SVN: r241593
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index d0ba896..341ecdf 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -423,8 +423,8 @@ rtx_writer::print_rtx_operand_code_r (const_rtx in_rtx)
void
rtx_writer::print_rtx_operand_code_u (const_rtx in_rtx, int idx)
{
- /* Don't print insn UIDs in compact mode, apart from in LABEL_REFs. */
- if (m_compact && GET_CODE (in_rtx) != LABEL_REF)
+ /* Don't print insn UIDs for PREV/NEXT_INSN in compact mode. */
+ if (m_compact && INSN_CHAIN_CODE_P (GET_CODE (in_rtx)) && idx < 2)
return;
if (XEXP (in_rtx, idx) != NULL)
@@ -672,10 +672,8 @@ rtx_writer::print_rtx (const_rtx in_rtx)
idx = 5;
#endif
- /* For insns, print the INSN_UID.
- In compact mode, we only print the INSN_UID of CODE_LABELs. */
- if (INSN_CHAIN_CODE_P (GET_CODE (in_rtx))
- && (!m_compact || GET_CODE (in_rtx) == CODE_LABEL))
+ /* For insns, print the INSN_UID. */
+ if (INSN_CHAIN_CODE_P (GET_CODE (in_rtx)))
{
if (flag_dump_unnumbered)
fprintf (m_outfile, " #");