RFR: 8360031: C2 compilation asserts in MemBarNode::remove [v2]
Damon Fenacci
dfenacci at openjdk.org
Mon Sep 8 09:29:27 UTC 2025
On Fri, 5 Sep 2025 09:45:38 GMT, Dean Long <dlong at openjdk.org> wrote:
> What happens in the replay crash is the MemBarStoreStore gets onto the worklist through an indirect route in ConnectionGraph::split_unique_types() because of its memory edge.
Oh I see! Thanks @dean-long! I noticed that `MemBarStoreStore` was added later on but didn't really figure out where/why.
> I think the conservative fix is to have compute_escape() always add the MemBarStoreStore to the worklist if it has a Precedent edge. Because of StressIGVN randomizing the worklist, I think the outcnt() can be 1 for either MemBarStoreStore or MemBarRelease, so we should relax the assert accordingly. I'm not sure how useful the assert will be after that. It might be better to remove it.
I made `compute_escape` add `MemBarStoreStore` to the worklist. By doing so the assert doesn't trigger anymore with the reproducer but, as you wrote, there seems to be no reason why `outcnt()` couldn't be 1 for `MemBarStoreStore` or `MemBarRelease`. So I modified the assert to only leave the `outcnt() <=2` part.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26556#issuecomment-3265399663
More information about the hotspot-compiler-dev
mailing list