Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-11-08 Thread Jeff Law via Gcc-patches
.  The APIs are exactly the same, and besides, the evrp analyzer is deprecated and slated for removal. OK for trunk? Aldy 0001-Convert-strlen-pass-from-evrp-to-ranger.patch From 152bc3a1dad9a960b7c0c53c65d6690532d9da5a Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 8 Oct 2021 15:54:23 +0

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-29 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 15, 2021, 12:39 Aldy Hernandez wrote: > > > On 10/15/21 2:47 AM, Andrew MacLeod wrote: > > On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: > >> On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: > >>> We seem to be passing a lot of context around in the strlen code.

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-25 Thread Aldy Hernandez via Gcc-patches
On Mon, Oct 25, 2021 at 6:42 AM Jeff Law wrote: > > > > On 10/24/2021 8:15 PM, Jeff Law wrote: > > > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > >> > >> > >> On 10/18/21 12:52 AM, Jeff Law wrote: > >>> > >>> > >>> On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > The foll

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-24 Thread Jeff Law via Gcc-patches
On 10/24/2021 8:15 PM, Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining use

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-24 Thread Jeff Law via Gcc-patches
On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't con

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-24 Thread Jeff Law via Gcc-patches
On 10/23/2021 3:32 PM, Jeff Law wrote: On 10/21/2021 12:20 PM, Jeff Law wrote: So if we're referring to those temporary const/copy propagations "escaping" into Ranger, then I would fully expect that to cause problems.  Essentially they're path sensitive const/copy propagations and may n

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-23 Thread Jeff Law via Gcc-patches
On 10/21/2021 12:20 PM, Jeff Law wrote: So if we're referring to those temporary const/copy propagations "escaping" into Ranger, then I would fully expect that to cause problems.  Essentially they're path sensitive const/copy propagations and may not be valid on all the paths through the C

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-22 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 15, 2021 at 12:39 PM Aldy Hernandez wrote: > Also, I am PINGing patch 0002, which is the strlen pass conversion to > the ranger. As mentioned, this is just a change from an evrp client to > a ranger client. The APIs are exactly the same, and besides, the evrp > analyzer is deprecate

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 1:42 AM, Aldy Hernandez wrote: Massaging the IL should only take two forms IIRC. First, if we have a simplification we can do. That could be const/copy propagation, replacing an expression with an SSA_NAME or constant and the like. It doesn't massage the IL just to massage the

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:43 PM, Jeff Law wrote: On 10/21/2021 6:56 AM, Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:46 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 3:30 PM Aldy Hernandez wrote: On 10/21/21 3:14 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 3:30 PM Aldy Hernandez wrote: > > > > On 10/21/21 3:14 PM, Richard Biener wrote: > > On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: > >> > >> On Thu, Oct 21, 2021 at 12:20 PM Richard Biener > >> wrote: > >>> > >>> On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: >

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 6:56 AM, Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:14 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wro

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: > > On Thu, Oct 21, 2021 at 12:20 PM Richard Biener > wrote: > > > > On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > > > > > > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > > > > > > > On 10/18/21 12:52 AM, Jeff Law

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > > > > On 10/18/21 12:52 AM, Jeff Law wrote: > > >> > > >> > > >> On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patche

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > On 10/18/21 12:52 AM, Jeff Law wrote: > >> > >> > >> On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > >>> The following patch converts the strlen pass from evrp to ranger,

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
> Massaging the IL should only take two forms IIRC. > > First, if we have a simplification we can do. That could be const/copy > propagation, replacing an expression with an SSA_NAME or constant and > the like. It doesn't massage the IL just to massage the IL. > > Second, we do temporarily copy p

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-20 Thread Jeff Law via Gcc-patches
On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't con

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't convert DOM as well?   DOM's use of EVRP is pretty

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/18/21 12:49 AM, Jeff Law wrote: On 10/15/2021 4:39 AM, Aldy Hernandez wrote: On 10/15/21 2:47 AM, Andrew MacLeod wrote: On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context aroun

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-17 Thread Jeff Law via Gcc-patches
On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't convert DOM as well?   DOM's use of EVRP is pretty limited.  You've mentioned FP bits befor

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-17 Thread Jeff Law via Gcc-patches
On 10/15/2021 4:39 AM, Aldy Hernandez wrote: On 10/15/21 2:47 AM, Andrew MacLeod wrote: On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-15 Thread Aldy Hernandez via Gcc-patches
e evrp analyzer is deprecated and slated for removal. OK for trunk? Aldy >From 152bc3a1dad9a960b7c0c53c65d6690532d9da5a Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 8 Oct 2021 15:54:23 +0200 Subject: [PATCH] Convert strlen pass from evrp to ranger. The following patch converts the

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as eith

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 4:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Martin Sebor via Gcc-patches
On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code. I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as either ptr_qry or rvals. That looks a bit messy. May I sugge

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-10 Thread Aldy Hernandez via Gcc-patches
On Sat, Oct 9, 2021 at 7:59 PM Martin Sebor wrote: > > On 10/9/21 10:19 AM, Martin Sebor wrote: > > On 10/9/21 9:04 AM, Aldy Hernandez wrote: > >> On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: > >>> > >>> On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > The following patch co

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Aldy Hernandez via Gcc-patches
We seem to be passing a lot of context around in the strlen code. I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as either ptr_qry or rvals. That looks a bit messy. May I suggest putting all of that in the strlen pass object (well, the d

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Martin Sebor via Gcc-patches
On 10/9/21 10:19 AM, Martin Sebor wrote: On 10/9/21 9:04 AM, Aldy Hernandez wrote: On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Martin Sebor via Gcc-patches
On 10/9/21 9:04 AM, Aldy Hernandez wrote: On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. Thanks for doing this. I know I s

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: > > On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > > The following patch converts the strlen pass from evrp to ranger, > > leaving DOM as the last remaining user. > > Thanks for doing this. I know I said I'd work on it but I'm still

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-08 Thread Martin Sebor via Gcc-patches
On 10/8/21 11:56 AM, Andrew MacLeod wrote: On 10/8/21 12:51 PM, Martin Sebor via Gcc-patches wrote: I.e., in the test: void g (char *s1, char *s2) {   char b[1025];   size_t n = __builtin_strlen (s1), d = __builtin_strlen (s2);   if (n + d + 1 >= 1025)     return;   sprintf (b, "%s.%s", s1,

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-08 Thread Andrew MacLeod via Gcc-patches
On 10/8/21 12:51 PM, Martin Sebor via Gcc-patches wrote: I.e., in the test: void g (char *s1, char *s2) {   char b[1025];   size_t n = __builtin_strlen (s1), d = __builtin_strlen (s2);   if (n + d + 1 >= 1025)     return;   sprintf (b, "%s.%s", s1, s2); // { dg-bogus "\\\[-Wformat-overflow" }

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-08 Thread Martin Sebor via Gcc-patches
On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. Thanks for doing this. I know I said I'd work on it but I'm still bogged down in my stage 1 work that's not going so great :( I j

[PATCH] Convert strlen pass from evrp to ranger.

2021-10-08 Thread Aldy Hernandez via Gcc-patches
The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. No additional cleanups have been done. For example, the strlen pass still has uses of VR_ANTI_RANGE, and the sprintf still passes around pairs of integers instead of using a proper range. Fi