On 1/21/2022 3:29 AM, Aldy Hernandez wrote:
On Fri, Jan 21, 2022 at 10:43 AM Richard Biener
<richard.guent...@gmail.com> wrote:
On Fri, Jan 21, 2022 at 9:30 AM Aldy Hernandez via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
As discussed in PR103721, the problem here is that we are crossing a
backedge and causing us to use relations from a previous iteration of a
loop.
This handles the testcases in both PR103721 and PR104067 which are variants
of the same thing.
Tested on x86-64 Linux with the usual regstrap as well as verifying the
thread count before and after the patch. The number of threads is
reduced by a miniscule amount.
I assume we need release manager approval at this point? OK for trunk?
Not for regression fixes.
OK, I've pushed it to fix the P1s. We can continue refining the
solution in a follow-up patch.
Btw, I wonder whether you have to treat irreducible regions in the same
way more generally - which edges are marked as backedge there depends
on which edge into the region was visited first. I also wonder how we
Jeff, Andrew??
I think this comes down to the dominator discussion we were having in
BZ. My understanding from reading Andrew's messages is that need to
reset relations when we cross an edge where the source of the edge does
not dominate the destination of the edge. That would solve the loop
problem, the irreducible region problem and I think other possibly
latent problems with threading & relations.
Jeff