[PATCH] tree-optimization/103440 - Always track arguments, even when ignoring equiv params.
Andrew MacLeod
amacleod@redhat.com
Mon Nov 29 17:20:09 GMT 2021
I need to adjust the original patch, I shouldn't have continued the loop
when dealing with equivalences. An equivalence is not the same as an
undefined value... we might be able to ignore the range from it for
calculation purposes, but we cannot ignore the fact that it is a
different SSA_NAME and may contain a different value that we do care about.
There are other checks in then loop which will allow us to assign an
equivalence between the DEF and an argument if we are ignoring the other
ssa_names.. such as when there are undefined values.
a_3 = PHI <a_1(4), a_2(6)>
if a_2 is undefined, we can create an equivalence between a_3 and a_1 as
the value of a_2 is irrelevant and can be whatever we want it to be.
if a_2 is instead an equivalence with a_3, we do not want to create an
equivalence between a_3 and a_1 in this block as we may then turn it
into a copy.. we'd only be able to do this if there was an equivalence
between a_1 and a_2, and we are not checking that.
Although we are may not be adding the range for a_2 into the cumulative
knowledge of a_3's range, we do need to keep the edge to retain the copy
as its value is important and could be different than the other
argument... and we need to retain the copy when we go out of ssa.
This fixes that oversight, bootstrapped on x86_64-pc-linux-gnu with no
regressions. OK?
Caveat.. the test case has an infinite loop without this fix, but
degagnu doesn't seem to kill it, and my test suite runs go forever.. if
there something I am missing? The gcc.log claims that it timeouts
after 300 second, but it doesn't kill the executable. I set the
dg-timeout field, but that appears to be a compile time timeout, not
runtime anyway.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Always-track-arguments-even-when-ignoring-equiv-para.patch
Type: text/x-patch
Size: 3105 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211129/6a8a07af/attachment-0001.bin>
More information about the Gcc-patches
mailing list