On Fri, 12 Dec 2025 16:05:01 GMT, Damon Fenacci <[email protected]> wrote:
>> src/hotspot/share/opto/graphKit.cpp line 2052:
>>
>>> 2050:
>>> 2051: // Don't add store to buffer call if we are strength reducing
>>> 2052: if (!C->strength_reduction()) {
>>
>> Can we use `_gvn.is_IterGVN() && !C->inlining_incrementally()` here instead?
>> Assuming that whenever we call this after parsing and when not incrementally
>> inlining, we are doing post-parse devirtualization of a call.
>
> That's a possibility. I've also considered checking for
> `!C->inlining_incrementally() && C->late_inline_count() > 0` but I'm a bit
> torn between being 100% sure we are doing strength reduction but using a
> compile "flags" (a bit 🫤) and checking for other, already available,
> conditions (like the one you suggest), which make me a bit unsure and could
> potentially change in the future...
> But I guess introducing a new field to `Compile` just for this should be
> avoided. So, let's go for `_gvn.is_IterGVN() && !C->inlining_incrementally()`
> 🙂
Fixed.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1768#discussion_r2618686348