public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3663] Make dump_ranger routines externally visible.
@ 2021-09-19 15:40 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-09-19 15:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8d42a27d8942e16e351d138955280a848d7b432a
commit r12-3663-g8d42a27d8942e16e351d138955280a848d7b432a
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Sun Sep 19 16:54:21 2021 +0200
Make dump_ranger routines externally visible.
There was an inline extern declaration for dump_ranger that was a bit of
a hack. I've removed it in favor of an actual prototype. There are
also some trivial changes to the dumping code in the path solver.
gcc/ChangeLog:
* gimple-range-path.cc (path_range_query::path_range_query): Add
header.
(path_range_query::dump): Remove extern declaration of dump_ranger.
* gimple-range-trace.cc (dump_ranger): Add DEBUG_FUNCTION marker.
* gimple-range-trace.h (dump_ranger): Add prototype.
Diff:
---
gcc/gimple-range-path.cc | 8 ++++++--
gcc/gimple-range-trace.cc | 4 ++--
gcc/gimple-range-trace.h | 3 +++
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc
index c616b65756f..10b018b5211 100644
--- a/gcc/gimple-range-path.cc
+++ b/gcc/gimple-range-path.cc
@@ -37,6 +37,9 @@ along with GCC; see the file COPYING3. If not see
path_range_query::path_range_query (gimple_ranger &ranger)
: m_ranger (ranger)
{
+ if (DEBUG_SOLVER)
+ fprintf (dump_file, "\n*********** path_range_query ******************\n");
+
m_cache = new ssa_global_cache;
m_has_cache_entry = BITMAP_ALLOC (NULL);
m_path = NULL;
@@ -85,14 +88,15 @@ path_range_query::set_cache (const irange &r, tree name)
void
path_range_query::dump (FILE *dump_file)
{
+ push_dump_file save (dump_file, dump_flags & ~TDF_DETAILS);
+
if (m_path->is_empty ())
return;
unsigned i;
bitmap_iterator bi;
- extern void dump_ranger (FILE *, const vec<basic_block> &);
- fprintf (dump_file, "Path is (length=%d):\n", m_path->length ());
+ fprintf (dump_file, "\nPath is (length=%d):\n", m_path->length ());
dump_ranger (dump_file, *m_path);
fprintf (dump_file, "Imports:\n");
diff --git a/gcc/gimple-range-trace.cc b/gcc/gimple-range-trace.cc
index 5175d1400c4..2417c21f1f2 100644
--- a/gcc/gimple-range-trace.cc
+++ b/gcc/gimple-range-trace.cc
@@ -176,7 +176,7 @@ push_dump_file::~push_dump_file ()
// Dump all that ranger knows for the current function.
-DEBUG_FUNCTION void
+void
dump_ranger (FILE *out)
{
push_dump_file save (out, dump_flags);
@@ -201,7 +201,7 @@ debug_ranger ()
// Note that the blocks are in reverse order, thus the exit block is
// path[0].
-DEBUG_FUNCTION void
+void
dump_ranger (FILE *dump_file, const vec<basic_block> &path)
{
if (path.length () == 0)
diff --git a/gcc/gimple-range-trace.h b/gcc/gimple-range-trace.h
index b9546a245d1..d3e69e03543 100644
--- a/gcc/gimple-range-trace.h
+++ b/gcc/gimple-range-trace.h
@@ -72,4 +72,7 @@ private:
dump_flags_t old_dump_flags;
};
+void dump_ranger (FILE *);
+void dump_ranger (FILE *, const vec<basic_block> &path);
+
#endif // GCC_GIMPLE_RANGE_TRACE_H
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-19 15:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 15:40 [gcc r12-3663] Make dump_ranger routines externally visible Aldy Hernandez
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).