Re: [PATCH] generalized range_query class for multiple contexts

2020-11-10 Thread Martin Sebor via Gcc-patches
On 11/6/20 2:54 PM, Andrew MacLeod wrote: On 11/6/20 11:13 AM, Martin Sebor wrote: On 11/5/20 8:08 PM, Andrew MacLeod wrote: On 11/5/20 7:50 PM, Martin Sebor wrote: On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-09 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 2:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: I have applied the patch and ran some tests.  There are quite a few failures (see the list below).  I have only looked at a couple.  The one in in gcc.dg/tree-ssa/builtin-sprintf-warn-3.c boils down to the follow

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-06 Thread Andrew MacLeod via Gcc-patches
On 11/6/20 11:13 AM, Martin Sebor wrote: On 11/5/20 8:08 PM, Andrew MacLeod wrote: On 11/5/20 7:50 PM, Martin Sebor wrote: On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 1

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-06 Thread Martin Sebor via Gcc-patches
On 11/5/20 8:08 PM, Andrew MacLeod wrote: On 11/5/20 7:50 PM, Martin Sebor wrote: On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: O

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 7:50 PM, Martin Sebor wrote: On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  >

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via G

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 2:29 PM, Martin Sebor wrote: signed char g (signed char min, signed char max) {   signed char i = x;   return i < min || max < i ? min : i; } void gg (void) {   __builtin_sprintf (a, "%i", g (0, 9));   // bogus warning } Im looking at this. its actually completely different code tha

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all this!  There isn't anything I don't unde

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all this!  There isn't anything I don't understand  >>> in the sprintf changes so no q

Re: [PATCH] generalized range_query class for multiple contexts

2020-10-01 Thread Martin Sebor via Gcc-patches
On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote: > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote: >>> Thanks for doing all this!  There isn't anything I don't understand >>> in the sprintf changes so no questions from me (well, almost none). >>>

Re: [PATCH] generalized range_query class for multiple contexts

2020-10-01 Thread Aldy Hernandez via Gcc-patches
On 10/1/20 3:22 PM, Andrew MacLeod wrote: > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote: >>> Thanks for doing all this! There isn't anything I don't understand >>> in the sprintf changes so no questions from me (well, almost none). >>> Just some comments: >> Thanks for your commen

Re: [PATCH] generalized range_query class for multiple contexts

2020-10-01 Thread Andrew MacLeod via Gcc-patches
On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote: Thanks for doing all this! There isn't anything I don't understand in the sprintf changes so no questions from me (well, almost none). Just some comments: Thanks for your comments on the sprintf/strlen API conversion. The current call

Re: [PATCH] generalized range_query class for multiple contexts

2020-10-01 Thread Aldy Hernandez via Gcc-patches
> Thanks for doing all this! There isn't anything I don't understand > in the sprintf changes so no questions from me (well, almost none). > Just some comments: Thanks for your comments on the sprintf/strlen API conversion. > > The current call statement is available in all functions that take >

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-30 Thread Andrew MacLeod via Gcc-patches
On 9/25/20 1:41 PM, Andrew MacLeod via Gcc-patches wrote: On 9/23/20 7:53 PM, Martin Sebor via Gcc-patches wrote: On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible. This not only hel

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-28 Thread Andrew MacLeod via Gcc-patches
On 9/28/20 11:27 AM, Martin Sebor wrote: On 9/25/20 11:41 AM, Andrew MacLeod wrote: Since you have replied to this thread, whats your opinion whether there should be an extra API entry point for range/value_after_stmt or whether that should be rolled into  the range_of_stmt routine, and an

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-28 Thread Martin Sebor via Gcc-patches
On 9/25/20 11:41 AM, Andrew MacLeod wrote: On 9/23/20 7:53 PM, Martin Sebor via Gcc-patches wrote: On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible. This not only helps in reducing

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-28 Thread Aldy Hernandez via Gcc-patches
On 9/25/20 3:17 PM, Andrew MacLeod wrote: On 9/24/20 5:51 PM, Martin Sebor via Gcc-patches wrote: On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: 3. Conversion of sprintf/strlen pass to class. This is a nonfunctional change to the sprintf/strlen passes. That is, no effort was

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-25 Thread Andrew MacLeod via Gcc-patches
On 9/23/20 7:53 PM, Martin Sebor via Gcc-patches wrote: On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible. This not only helps in reducing the maintenance burden going forward, but p

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-25 Thread Andrew MacLeod via Gcc-patches
On 9/24/20 5:51 PM, Martin Sebor via Gcc-patches wrote: On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: 3. Conversion of sprintf/strlen pass to class. This is a nonfunctional change to the sprintf/strlen passes. That is, no effort was made to change the passes to multi-ranges.  Ho

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-24 Thread Martin Sebor via Gcc-patches
On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible.  This not only helps in reducing the maintenance burden going forward, but provides mechanisms for backwards compatibility between

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-24 Thread Martin Sebor via Gcc-patches
On 9/24/20 12:46 AM, Aldy Hernandez wrote: On 9/24/20 1:53 AM, Martin Sebor wrote: Finally, unless both a type and function with the same name exist in the same scope there is no reason to mention the class-id when referencing a class name.  I.e., this    value_range_equiv *allocate_value_ra

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-23 Thread Aldy Hernandez via Gcc-patches
On 9/24/20 1:53 AM, Martin Sebor wrote: Finally, unless both a type and function with the same name exist in the same scope there is no reason to mention the class-id when referencing a class name.  I.e., this   value_range_equiv *allocate_value_range_equiv ();   void free_value_range_equi

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-23 Thread Martin Sebor via Gcc-patches
On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible.  This not only helps in reducing the maintenance burden going forward, but provides mechanisms for backwards compatibility between

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-18 Thread Aldy Hernandez via Gcc-patches
Forgot to include ChangeLog entries. Aldy >From 49246a5aa51aff0e1beb97b8415985ffdbd5d922 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 17 Sep 2020 09:23:12 +0200 Subject: [PATCH 1/3] Initial implementation of value query class. gcc/ChangeLog: * Makefile.in: Add value-query.o