]> git.ipfire.org Git - thirdparty/gcc.git/commit
Convert vrange dumping facilities to pretty_printer.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 14 Jul 2022 17:04:09 +0000 (19:04 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 15 Jul 2022 09:41:03 +0000 (11:41 +0200)
commit64864aa9e6ea347a4f9c7027941be898ce993f85
treef26899fcf6deec978749c35d04c96ba9b5469fa2
parent91a7f30662cd8da14f0ae5eec1ce13aa29f1817c
Convert vrange dumping facilities to pretty_printer.

We need to dump global ranges from the gimple pretty printer code, but
all the vrange dumping facilities work with FILE handles.  This patch
converts all the dumping methods to work with pretty printers, and
provides a wrapper so the FILE * methods continue to work for
debugging.  I also cleaned up the code a bit.

Tested on x86-64 Linux.

gcc/ChangeLog:

* Makefile.in (OBJS): Add value-range-pretty-print.o.
* pretty-print.h (pp_vrange): New.
* value-range.cc (vrange::dump): Call pp version.
(unsupported_range::dump): Move to its own file.
(dump_bound_with_infinite_markers): Same.
(irange::dump): Same.
(irange::dump_bitmasks): Same.
(vrange::debug): Remove.
* value-range.h: Remove virtual designation for dump methods.
Remove dump_bitmasks method.
* value-range-pretty-print.cc: New file.
* value-range-pretty-print.h: New file.
gcc/Makefile.in
gcc/pretty-print.h
gcc/value-range-pretty-print.cc [new file with mode: 0644]
gcc/value-range-pretty-print.h [new file with mode: 0644]
gcc/value-range.cc
gcc/value-range.h