* [PATCH 1/5] fix anti-range dumping
@ 2023-02-28 13:47 Richard Biener
2023-03-01 10:08 ` Aldy Hernandez
0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2023-02-28 13:47 UTC (permalink / raw)
To: gcc-patches
when vrange_printer::visit gets a VR_ANTI_RANGE it should print it
as such, not just print the first element as range. When
irange::num_pairs and upper/lower_bound are fixed that would no
longer print a canonicalized anti-range.
* value-range-pretty-print.cc (vrange_printer::visit):
Handle all VR_ANTI_RANGE specially.
---
gcc/value-range-pretty-print.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/value-range-pretty-print.cc b/gcc/value-range-pretty-print.cc
index d20e2562431..23817f48a3d 100644
--- a/gcc/value-range-pretty-print.cc
+++ b/gcc/value-range-pretty-print.cc
@@ -64,7 +64,7 @@ vrange_printer::visit (const irange &r) const
return;
}
// Handle legacy symbolics.
- if (!r.constant_p ())
+ if (!r.constant_p () || r.kind () == VR_ANTI_RANGE)
{
if (r.kind () == VR_ANTI_RANGE)
pp_character (pp, '~');
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/5] fix anti-range dumping
2023-02-28 13:47 [PATCH 1/5] fix anti-range dumping Richard Biener
@ 2023-03-01 10:08 ` Aldy Hernandez
0 siblings, 0 replies; 2+ messages in thread
From: Aldy Hernandez @ 2023-03-01 10:08 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
Ughh, you're touching everything I'm nuking next release ;-).
But yes, that's an oversight.
OK.
On Tue, Feb 28, 2023 at 2:48 PM Richard Biener via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> when vrange_printer::visit gets a VR_ANTI_RANGE it should print it
> as such, not just print the first element as range. When
> irange::num_pairs and upper/lower_bound are fixed that would no
> longer print a canonicalized anti-range.
>
> * value-range-pretty-print.cc (vrange_printer::visit):
> Handle all VR_ANTI_RANGE specially.
> ---
> gcc/value-range-pretty-print.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/value-range-pretty-print.cc b/gcc/value-range-pretty-print.cc
> index d20e2562431..23817f48a3d 100644
> --- a/gcc/value-range-pretty-print.cc
> +++ b/gcc/value-range-pretty-print.cc
> @@ -64,7 +64,7 @@ vrange_printer::visit (const irange &r) const
> return;
> }
> // Handle legacy symbolics.
> - if (!r.constant_p ())
> + if (!r.constant_p () || r.kind () == VR_ANTI_RANGE)
> {
> if (r.kind () == VR_ANTI_RANGE)
> pp_character (pp, '~');
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-01 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 13:47 [PATCH 1/5] fix anti-range dumping Richard Biener
2023-03-01 10:08 ` Aldy Hernandez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).