RFR: 8375046: C2: Incremental inlining step asserts when processing empty late inlines list [v4]

Aleksey Shipilev shade at openjdk.org
Wed Jan 28 09:38:50 UTC 2026


On Tue, 20 Jan 2026 19:39:24 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> The behavior is counter-intuitive and can cause other surprises later. Instead, I suggest to add ` if (_late_inlines.length() == 0) return;` in `Compile::inline_incrementally()` before calling into `inline_incrementally_one()`.

All right, that makes sense as well. In fact, I think the existing check within `Compile::inline_incrementally()` loop is in the wrong place, as `_late_inlines.length() > 0` would be immediately checked as loop condition. So the fix is to move the check a bit earlier. See new PR version. This passes light testing, I am going to run a more thorough CTW loop and see if it holds.

I'll move `GrowableArray` improvement to a separate PR.

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

PR Comment: https://git.openjdk.org/jdk/pull/29171#issuecomment-3810105644


More information about the hotspot-dev mailing list