Re: PING: [PATCH] Convert -Wrestrict pass to ranger.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/19/20 1:23 PM, Aldy Hernandez wrote: Rebased on current trunk. There is one adjustment to a C++ test which now gives a false positive. After talking with Martin Sebor, we've concluded this is expected. There is no way to communicate that libstdc++ allocated objects are always less than PT

PING: [PATCH] Convert -Wrestrict pass to ranger.

2020-10-19 Thread Aldy Hernandez via Gcc-patches
Rebased on current trunk. There is one adjustment to a C++ test which now gives a false positive. After talking with Martin Sebor, we've concluded this is expected. There is no way to communicate that libstdc++ allocated objects are always less than PTRDIFF_MAX. OK? gcc/ChangeLog:

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 3:27 PM, Martin Sebor wrote: On 10/5/20 8:18 PM, Andrew MacLeod wrote: On 10/5/20 4:16 PM, Martin Sebor wrote: Long term, I would expect we might have some sort of general access... probably thru cfun.     so any pass/routines would just ask for      RANGE_INFO (cfun)->range_of_exp

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/5/20 8:18 PM, Andrew MacLeod wrote: On 10/5/20 4:16 PM, Martin Sebor wrote: On 10/5/20 8:50 AM, Aldy Hernandez via Gcc-patches wrote: [Martin, as the original author of this pass, do you have any concerns?] @@ -1270,7 +1271,21 @@ get_size_range (tree exp, tree range[2], bool allow_zer

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Aldy Hernandez via Gcc-patches
On 10/6/20 4:51 PM, Martin Sebor wrote: On 10/6/20 8:42 AM, Andrew MacLeod wrote: On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst,

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/6/20 8:42 AM, Andrew MacLeod wrote: On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, c

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Andrew MacLeod via Gcc-patches
On 10/6/20 10:30 AM, Martin Sebor wrote: On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descri

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Martin Sebor via Gcc-patches
On 10/6/20 3:45 AM, Aldy Hernandez wrote: -  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descriptor of the access.  This may adjust both

Re: [patch] convert -Wrestrict pass to ranger

2020-10-06 Thread Aldy Hernandez via Gcc-patches
-  builtin_memref dstref (dst, dstsize); -  builtin_memref srcref (src, srcsize); +  builtin_memref dstref (query, call, dst, dstsize); +  builtin_memref srcref (query, call, src, srcsize);     /* Create a descriptor of the access.  This may adjust both DSTREF    and SRCREF based on one anoth

Re: [patch] convert -Wrestrict pass to ranger

2020-10-05 Thread Andrew MacLeod via Gcc-patches
On 10/5/20 4:16 PM, Martin Sebor wrote: On 10/5/20 8:50 AM, Aldy Hernandez via Gcc-patches wrote: [Martin, as the original author of this pass, do you have any concerns?] @@ -1270,7 +1271,21 @@ get_size_range (tree exp, tree range[2], bool allow_zero /* = false */)     enum value_range_kind

Re: [patch] convert -Wrestrict pass to ranger

2020-10-05 Thread Martin Sebor via Gcc-patches
On 10/5/20 8:50 AM, Aldy Hernandez via Gcc-patches wrote: [Martin, as the original author of this pass, do you have any concerns?] No concerns, just a few minor things. This patch converts the -Wrestrict pass to use an on-demand ranger instead of global ranges. No effort was made to conver

[patch] convert -Wrestrict pass to ranger

2020-10-05 Thread Aldy Hernandez via Gcc-patches
[Martin, as the original author of this pass, do you have any concerns?] This patch converts the -Wrestrict pass to use an on-demand ranger instead of global ranges. No effort was made to convert value_range's into multi-ranges. Basically, the places that were using value_range's, and looking