On 02/09/2016 12:55 AM, Bernhard Reutner-Fischer wrote:
On February 8, 2016 9:18:03 AM GMT+01:00, Jeff Law <l...@redhat.com> wrote:
This turns out to be far easier than expected. Given a conditional
like
x == y, we already record the canonicalized x = y equivalence. If we
just record y = x then this "just works".
The only tricky thing is the following of the SSA_NAME_VALUE chain for
the source argument -- we need to avoid that when recording the y = x
variant (since following x's value chain would lead back to y). That's
easily resolved with an _raw variant which doesn't follow the source
value chain.
While working through the code, I saw the old comment WRT loop depth
and
PR 61757 in record_equality. With the code to follow backedges in the
CFG gone from the old threader, that code is no longer needed. So I
removed it, restoring Richi's cleanup work from early 2015.
Bootstrapped & regression tested on x86-linux. Installed on the trunk.
+ /* We already recorded that LHS = RHS, with canonicalization,
+ value chain following, etc.
+
+ We also want to return RHS = LHS, but without any canonicalization
Just curious and for my education, we want to *record*, not to return, don't we?
Correct. Thanks for pointing it out. I've just fixed this typo on the
trunk.
jeff