Fwd: [patch] substitute_and_fold_engine merge with evrp domwalker

Aldy Hernandez aldyh@redhat.com
Sun May 31 18:18:57 GMT 2020


PING

---------- Forwarded message ---------
From: Aldy Hernandez <aldyh@redhat.com>
Date: Mon, May 18, 2020 at 7:59 PM
Subject: [patch] substitute_and_fold_engine merge with evrp domwalker
To: Jeff Law <law@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>


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.

OK for mainline?

Aldy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: curr.patch
Type: application/x-patch
Size: 29183 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200531/f021d7b3/attachment-0001.bin>


More information about the Gcc-patches mailing list