diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-09-22 18:07:03 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-09-23 10:52:20 +0200 |
commit | 0706262498bc5d206330c08414df0c780a0c3141 (patch) | |
tree | 2a0875ec30b2eb786bf637753f7778a2000f2f7e /gcc/value-range.cc | |
parent | 651625728520b5e1d926f0e12018c96f3fe18b22 (diff) | |
download | gcc-0706262498bc5d206330c08414df0c780a0c3141.zip gcc-0706262498bc5d206330c08414df0c780a0c3141.tar.gz gcc-0706262498bc5d206330c08414df0c780a0c3141.tar.bz2 |
frange: dump hex values when dumping FP numbers.
It has been suggested that if we start bumping numbers by an ULP when
calculating open ranges (for example the numbers less than 3.0) that
dumping these will become increasingly harder to read, and instead we
should opt for the hex representation. I still find the floating
point representation easier to read for most numbers, but perhaps we
could have both?
With this patch this is the representation for [15.0, 20.0]:
[frange] float [1.5e+1 (0x0.fp+4), 2.0e+1 (0x0.ap+5)]
Would you find this useful, or should we stick to the hex
representation only?
Tested on x86-64 Linux.
gcc/ChangeLog:
* value-range-pretty-print.cc (vrange_printer::print_real_value): New.
(vrange_printer::visit): Call print_real_value.
* value-range-pretty-print.h: New print_real_value.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions