Dump when estimating the number of iterations of a loop

Message ID 20220321093430.00A1D13A5E@imap2.suse-dmz.suse.de
State Committed
Commit 70b8f43695b0e6fabc760d247ac83f354092b21d
Headers
Series Dump when estimating the number of iterations of a loop |

Commit Message

Richard Biener March 21, 2022, 9:34 a.m. UTC
  Currently the dumps are somewhat inter-mangled, not showing the
(possibly bad) recursion between niter estimation and number of
iteration computation.  The following tries to improve deciphering
a little bit by dumping when we do niter estimation.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

2022-03-21  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop-niter.cc (estimate_numbers_of_iterations): Dump
	we are estimating niter of loop.
---
 gcc/tree-ssa-loop-niter.cc | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc
index 9bb5097379b..afa51064953 100644
--- a/gcc/tree-ssa-loop-niter.cc
+++ b/gcc/tree-ssa-loop-niter.cc
@@ -4374,6 +4374,9 @@  estimate_numbers_of_iterations (class loop *loop)
   if (loop->estimate_state != EST_NOT_COMPUTED)
     return;
 
+  if (dump_file && (dump_flags & TDF_DETAILS))
+    fprintf (dump_file, "Estimating # of iterations of loop %d\n", loop->num);
+
   loop->estimate_state = EST_AVAILABLE;
 
   /* If we have a measured profile, use it to estimate the number of