On 05/23/2017 06:48 AM, Aldy Hernandez wrote:
The class can live outside of his work, as can be demonstrated by the attached patch. With it, I was able to rewrite the post-VRP range information to use this class and get rid of VR_ANTI_RANGE throughout the compiler. A VR_ANTI_RANGE of ~[5,10] becomes [-MIN,4][11,+MAX].
Seems useful.
+ /* Remove negative numbers from the range. */ + irange positives; + range_positives (&positives, exptype, allow_zero ? 0 : 1);
'allow_zero ? 0 : 1' looks mighty strange. I know that's a nit, but you placed it front and centre!
+ if (positives.Intersect (*ir))
I notice you have a number of Uppercase member fns ... nathan -- Nathan Sidwell