we have flow_loop_dump and print_loop. While print_loop was extended to dump
stuff from loop structure we added over years (loop info), flow_loop_dump was not.
-fdump-tree-all files contains flow_loop_dump which makes it hard to see what
metadata we have attached to loop.
This patch unifies dumping of these fields from both functions. For example for:
int a[100];
main()
{
for (int i = 0; i < 10; i++)
a[i]=i;
}
we now print:
;; Loop 0
;; header 0, latch 1
;; depth 0, outer -1
;; nodes: 0 1 2 3 4 5
;;
;; Loop 1
;; header 4, latch 3
;; depth 1, outer 0, finite_p
;; upper_bound 10
;; likely_upper_bound 10
;; estimate 10
;; iterations by profile: 10.001101 (unreliable)
finite_p, upper_boud, likely_upper_bound estimate and iterations by profile is new.
Bootstrap/regtest on x86_64 in progress. OK if it passes?
Honza
gcc/ChangeLog:
* cfgloop.cc (flow_loop_dump): Use print_loop_info.
* cfgloop.h (print_loop_info): Declare.
* tree-cfg.cc (print_loop_info): Break out from ...; add
printing of missing fields and profile
(print_loop): ... here.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/dce-1.c: Update for new loop dumps.