diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-10-13 13:17:59 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-10-13 13:17:59 +0000 |
commit | 7810c4ebfc4ecaf5efd532d05af6a3ed75b1e6dc (patch) | |
tree | de1bdc49e4b5ea7c8cb945574137a3e85c85f946 /gcc/function-tests.c | |
parent | 950e6f418ae2c2a110bc72520deba87289def55e (diff) | |
download | gcc-7810c4ebfc4ecaf5efd532d05af6a3ed75b1e6dc.zip gcc-7810c4ebfc4ecaf5efd532d05af6a3ed75b1e6dc.tar.gz gcc-7810c4ebfc4ecaf5efd532d05af6a3ed75b1e6dc.tar.bz2 |
Add a "compact" mode to print_rtx_function
gcc/ChangeLog:
* function-tests.c (selftest::test_expansion_to_rtl): Add "true"
for new "compact" param of print_rtx_function. Check for "cinsn"
rather than "insn".
* print-rtl-function.c (flag_compact): New decl.
(print_rtx_function): Add param "compact" and use it to set
flag_compact, adding a description of the effect to the leading
comment, and updating the example output.
* print-rtl.c (flag_compact): New variable.
(print_rtx_operand_code_0): Omit the JUMP_LABEL reference in compact
mode.
(print_rtx_operand_code_i): When printing source locations, wrap
xloc.file in quotes. Don't print INSN_CODEs in compact mode.
(print_rtx_operand_code_r): Don't print regnos for hard regs and
virtuals in compact mode.
(print_rtx_operand_code_u): Don't print insn UIDs in compact mode,
apart from in LABEL_REFs.
(print_rtx_operand): In case 'w', don't print in hex in compact mode.
Don't print basic block ids in compact mode.
(print_rtx): In compact mode, prefix the code of insns with "c",
only print the INSN_UID of CODE_LABELs, and omit their LABEL_NUSES.
* print-rtl.h (print_rtx_function): Add "compact" param.
gcc/testsuite/ChangeLog:
* gcc.target/i386/vararg-loc.c: Update for quoting of xloc.file
in INSN_LOCATION.
From-SVN: r241120
Diffstat (limited to 'gcc/function-tests.c')
-rw-r--r-- | gcc/function-tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/function-tests.c b/gcc/function-tests.c index 049a07f9..b0c44cf 100644 --- a/gcc/function-tests.c +++ b/gcc/function-tests.c @@ -648,7 +648,7 @@ test_expansion_to_rtl () /* Verify that print_rtl_function is sane. */ named_temp_file tmp_out (".rtl"); FILE *outfile = fopen (tmp_out.get_filename (), "w"); - print_rtx_function (outfile, fun); + print_rtx_function (outfile, fun, true); fclose (outfile); char *dump = read_file (SELFTEST_LOCATION, tmp_out.get_filename ()); @@ -656,7 +656,7 @@ test_expansion_to_rtl () ASSERT_STR_CONTAINS (dump, " (insn-chain\n"); ASSERT_STR_CONTAINS (dump, " (block 2\n"); ASSERT_STR_CONTAINS (dump, " (edge-from entry (flags \"FALLTHRU\"))\n"); - ASSERT_STR_CONTAINS (dump, " (insn "); /* ...etc. */ + ASSERT_STR_CONTAINS (dump, " (cinsn "); /* ...etc. */ ASSERT_STR_CONTAINS (dump, " (edge-to exit (flags \"FALLTHRU\"))\n"); ASSERT_STR_CONTAINS (dump, " ) ;; block 2\n"); ASSERT_STR_CONTAINS (dump, " ) ;; insn-chain\n"); |