public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5049] Cleanup path solver dumps. Date: Tue, 9 Nov 2021 13:29:43 +0000 (GMT) [thread overview] Message-ID: <20211109132943.DB4863858415@sourceware.org> (raw) https://gcc.gnu.org/g:2fc9b4d7b0cbc88e9986486329abe899a07729de commit r12-5049-g2fc9b4d7b0cbc88e9986486329abe899a07729de Author: Aldy Hernandez <aldyh@redhat.com> Date: Tue Nov 9 10:43:25 2021 +0100 Cleanup path solver dumps. This patch makes the path solver dumps a bit more consistent. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::dump): Clean up. (path_range_query::compute_ranges): Same. * value-relation.cc (path_oracle::dump): Same. Diff: --- gcc/gimple-range-path.cc | 11 ++++------- gcc/value-relation.cc | 6 +++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc index 52de10369f3..99ac947581b 100644 --- a/gcc/gimple-range-path.cc +++ b/gcc/gimple-range-path.cc @@ -98,7 +98,6 @@ path_range_query::dump (FILE *dump_file) unsigned i; bitmap_iterator bi; - fprintf (dump_file, "\nPath is (length=%d):\n", m_path->length ()); dump_ranger (dump_file, *m_path); fprintf (dump_file, "Imports:\n"); @@ -505,7 +504,7 @@ path_range_query::compute_ranges (const vec<basic_block> &path, const bitmap_head *imports) { if (DEBUG_SOLVER) - fprintf (dump_file, "\n*********** path_range_query ******************\n"); + fprintf (dump_file, "\n==============================================\n"); set_path (path); bitmap_copy (m_imports, imports); @@ -519,13 +518,13 @@ path_range_query::compute_ranges (const vec<basic_block> &path, if (DEBUG_SOLVER) { - fprintf (dump_file, "\npath_range_query: compute_ranges for path: "); + fprintf (dump_file, "path_range_query: compute_ranges for path: "); for (unsigned i = path.length (); i > 0; --i) { basic_block bb = path[i - 1]; - fprintf (dump_file, "BB %d", bb->index); + fprintf (dump_file, "%d", bb->index); if (i > 1) - fprintf (dump_file, ", "); + fprintf (dump_file, "->"); } fprintf (dump_file, "\n"); } @@ -557,9 +556,7 @@ path_range_query::compute_ranges (const vec<basic_block> &path, if (DEBUG_SOLVER) { - fprintf (dump_file, "\npath_oracle:\n"); get_path_oracle ()->dump (dump_file); - fprintf (dump_file, "\n"); dump (dump_file); } } diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc index a0105481466..9c3ecd94b13 100644 --- a/gcc/value-relation.cc +++ b/gcc/value-relation.cc @@ -1448,10 +1448,14 @@ void path_oracle::dump (FILE *f) const { equiv_chain *ptr = m_equiv.m_next; + relation_chain *ptr2 = m_relations.m_head; + + if (ptr || ptr2) + fprintf (f, "\npath_oracle:\n"); + for (; ptr; ptr = ptr->m_next) ptr->dump (f); - relation_chain *ptr2 = m_relations.m_head; for (; ptr2; ptr2 = ptr2->m_next) { fprintf (f, "Relational : ");
reply other threads:[~2021-11-09 13:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211109132943.DB4863858415@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).