On May 18, 2020 7:59:45 PM GMT+02:00, Aldy Hernandez via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: >Howdy. > >The main evrp domwalker seems cut and pasted from the >substitute_and_fold_engine (or was it the other way around?). Albeit, > >there are a few things that evrp does, like set up ranges, but these >can >be set up with virtuals, and thus provide a general repository to do >all >things subst & fold, which I think was the main idea. > >You will notice that the resulting evrp code becomes a handful of lines > >calling evrp_analyze to set up ranges. > >We've been playing with this approach on the ranger branch, and have >been able to use it to implement ranger-vrp in 24 lines, all while >sharing all the evrp folding code. Granted, the ranger also needs >access to vr_values::simplify_using_ranges* which I have abstracted >into >an independent class and will post as a follow-up. > >Also, for future-proofing, I have added a gimple statement argument to >get_value(). This provides context where a future ranger (evrp, VRP, >ranger, whatever) can provide better values depending on the statement >we are processing.
Ranges before or after the stmt? There are currently conflicting uses... (I did have a patch to expose non-zeroness for integer division dividend but that causes some code to think this holds for the stmt itself). So this has to be appearant from the API. Richard. > >OK for mainline? > >Aldy