tree-optimization/100112 - VN last_vuse and redundant store elimination
This avoids the last_vuse optimization hindering redundant store
elimination by always also recording the original VUSE that was
in effect on the load.
In stage3 gcc/*.o we have 3182752 times recorded a single
entry and 903409 times two entries (that's ~20% overhead).
With just recording a single entry the number of hashtable lookups
done when walking the vuse->vdef links to find an earlier access
is
28961618. When recording the second entry this makes us find
that earlier for donwnstream redundant accesses, reducing the number
of hashtable lookups to
25401052 (that's a ~10% reduction).
2021-09-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/100112
* tree-ssa-sccvn.c (visit_reference_op_load): Record the
referece into the hashtable twice in case last_vuse is
different from the original vuse on the stmt.
* gcc.dg/tree-ssa/ssa-fre-95.c: New testcase.