Re: [PUSHED] Abstract out non_null adjustments in ranger.

2021-07-22 Thread Aldy Hernandez via Gcc-patches
Well, arbitrarily allowing everything caused some -Wnonnull regressions. I've changed the check to !r.zero_p() && !r.nonzero_p(), as the only reasonable ranges for pointers besides varying/undefined are zero and non-zero. Attached is the final version of the patch I have pushed. Tested on x86-64

Re: [PUSHED] Abstract out non_null adjustments in ranger.

2021-07-21 Thread Aldy Hernandez via Gcc-patches
As I mentioned when I pushed the patch in this thread, I have run into cases where a pointer has a non-varying range, but it includes 0. The varying check causes no further refinements to be done. The previous cases I had seen were in follow-up threader work, so I was delaying pushing this until

[PUSHED] Abstract out non_null adjustments in ranger.

2021-07-15 Thread Aldy Hernandez via Gcc-patches
There are 4 exact copies of the non-null range adjusting code in the ranger. This patch abstracts the functionality into a separate method. As a follow-up I would like to remove the varying_p check, since I have seen incoming ranges such as [0, 0xffef] which are not varying, but are not-null.