RFR: 8307084: C2: Vectorized drain loop is not executed for some small trip counts [v2]

Fei Gao fgao at openjdk.org
Mon Nov 10 15:25:24 UTC 2025


On Mon, 8 Sep 2025 10:41:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Ah, are we only removing nodes?
>
> Oh, you have another implicit zero check here.

> Ah, are we only removing nodes?

Yes, just removing nodes here.

>> Maybe you can construct some graph where this really visits a lot of nodes, then this could blow up quadratically.
>
> `pop` is more efficient, because it just takes it from the end. But then you'd get a DFS and not BFS.

Yes, we need BFS here — that’s why I used `remove`. I haven’t yet figured out a more efficient way to handle some of the corner cases.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22629#discussion_r2510964595
PR Review Comment: https://git.openjdk.org/jdk/pull/22629#discussion_r2503271161


More information about the hotspot-compiler-dev mailing list