On Wed, Oct 19, 2022 at 08:37:57PM -0400, Andrew MacLeod wrote: > This patch adds basic support for ASSUME functions to VRP. > > Based on the previous set of patches, Ive cleaned them up, and this provides > the basic support from rangers generalized model. It does not support > non-ssa name parameters, I think you might be on your own for that. > > I modified Jakubs assumption pass to use GORI to query parameter rangers in > assumption functions and set the global range for those, and then ranger's > infer infrastructure is used to inject these rangers at assume call > locations in VRP. > > I also added an optimization testcase that tests the basic functionality in > VRP2. For instance it can reduce: > > int > f2 (int x, int y, int z) > { > [[assume (x+12 == 14 && y >= 0 && y + 10 < 13 && z + 4 >= 4 && z - 2 < > 18)]]; > unsigned q = x + y + z; > if (q*2 > 46) > return 0; > return 1; > } > > to: > > return 1; > > > Its good to get us going, bt I think theres still lots of room for > improvement. > > Bootstraps on x86_64-pc-linux-gnu with no regressions. Pushed.
Thanks. Jakub