diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-26 18:25:14 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-26 18:25:14 +0000 |
commit | f17750b2e0b626707424abdc1037417777f79b78 (patch) | |
tree | 7a4e43895ef2a596be72dfbe2ecda75d47f6b056 | |
parent | be10b363fbb573c79523b51870348210cce6995e (diff) | |
download | gcc-f17750b2e0b626707424abdc1037417777f79b78.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241593 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/print-rtl.c | 10 | ||||
-rw-r--r-- | gcc/print-rtl.h | 2 | ||||
-rw-r--r-- | gcc/rtl-tests.c | 4 |
4 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c50d8f44abe..02a37f61933 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2016-10-26 David Malcolm <dmalcolm@redhat.com> + + * 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. + 2016-10-26 Pat Haugen <pthaugen@us.ibm.com> * haifa-sched.c (call_used_regs_num): Rename to... diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index d0ba896f3e2..341ecdfedb8 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, " #"); diff --git a/gcc/print-rtl.h b/gcc/print-rtl.h index 4ebfcf99b03..8496ffa1491 100644 --- a/gcc/print-rtl.h +++ b/gcc/print-rtl.h @@ -50,7 +50,7 @@ class rtx_writer bool m_simple; /* If true, use compact dump format: - - INSN_UIDs are omitted, except for jumps and CODE_LABELs, + - PREV/NEXT_INSN UIDs are omitted - INSN_CODEs are omitted, - register numbers are omitted for hard and virtual regs, and non-virtual pseudos are offset relative to the first such reg, and diff --git a/gcc/rtl-tests.c b/gcc/rtl-tests.c index 43665ba6281..4e534b2316f 100644 --- a/gcc/rtl-tests.c +++ b/gcc/rtl-tests.c @@ -121,7 +121,7 @@ test_dumping_insns () /* Barriers. */ rtx_barrier *barrier = as_a <rtx_barrier *> (rtx_alloc (BARRIER)); SET_NEXT_INSN (barrier) = NULL; - ASSERT_RTL_DUMP_EQ ("(cbarrier)\n", barrier); + ASSERT_RTL_DUMP_EQ ("(cbarrier 0)\n", barrier); /* Labels. */ rtx_insn *label = gen_label_rtx (); @@ -179,7 +179,7 @@ test_uncond_jump () ASSERT_TRUE (onlyjump_p (jump_insn)); ASSERT_TRUE (control_flow_insn_p (jump_insn)); - ASSERT_RTL_DUMP_EQ ("(cjump_insn (set (pc)\n" + ASSERT_RTL_DUMP_EQ ("(cjump_insn 1 (set (pc)\n" " (label_ref 0))\n" " (nil))\n", jump_insn); |