[gcc r12-3334] Add function name when dumping ranger contents.

Aldy Hernandez aldyh@gcc.gnu.org
Fri Sep 3 13:32:00 GMT 2021


https://gcc.gnu.org/g:4db10cbf21dfe48e72880f592c1b5640baaf16cf

commit r12-3334-g4db10cbf21dfe48e72880f592c1b5640baaf16cf
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Sep 3 11:32:11 2021 +0200

    Add function name when dumping ranger contents.
    
    These are minor cleanups to the dumping code.
    
    Tested on x86-64 Linux.
    
    gcc/ChangeLog:
    
            * gimple-range-trace.cc (debug_seed_ranger): Remove static.
            (dump_ranger): Dump function name.

Diff:
---
 gcc/gimple-range-trace.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/gimple-range-trace.cc b/gcc/gimple-range-trace.cc
index 1feb978e928..449ed8373fd 100644
--- a/gcc/gimple-range-trace.cc
+++ b/gcc/gimple-range-trace.cc
@@ -130,7 +130,7 @@ range_tracer::trailer (unsigned counter, const char *caller, bool result,
 
 // Query all statements in the IL to precalculate computable ranges in RANGER.
 
-static DEBUG_FUNCTION void
+DEBUG_FUNCTION void
 debug_seed_ranger (gimple_ranger &ranger)
 {
   // Recalculate SCEV to make sure the dump lists everything.
@@ -161,6 +161,11 @@ DEBUG_FUNCTION void
 dump_ranger (FILE *out)
 {
   gimple_ranger ranger;
+
+  fprintf (out, ";; Function ");
+  print_generic_expr (out, current_function_decl);
+  fprintf (out, "\n");
+
   debug_seed_ranger (ranger);
   ranger.dump (out);
 }


More information about the Gcc-cvs mailing list