On Fri, Apr 01, 2016 at 11:08:09AM +0200, Richard Biener wrote: > > RTL DSE uses true_dependence to see whether a store may be killed by > anothe store - that's obviously broken. The following patch makes > it use output_dependence instead (introducing a canon_ variant of that).
I think it would be interesting to see some stats on what effect does this have on the optimization RTL DSE is doing (say gather during unpatched bootstrap/regtest number of successfully optimized replace_read calls, and the same with patched bootstrap/regtest). >From quick look at the patch, this wouldn't optimize even the cases that could be optimized (return *pi;) at the RTL level. If the statistics would show this affects it significantly, perhaps we could do both canon_true_dependence and canon_output_dependence, and if the two calls differ, don't clear the rhs, but mark it somehow and then in replace_read check what alias set is used for the read or something similar? Jakub