RFR: 8296545: C2 Blackholes should allow load optimizations [v3]

Aleksey Shipilev shade at openjdk.org
Mon Nov 14 19:47:31 UTC 2022


On Fri, 11 Nov 2022 01:02:35 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Well, I don't see how I can make `Blackhole` produce only control. It seems the rest of C2 code frowns upon CFG nodes that are not control projections (or safepoints), see e.g. `is_control_proj_or_safepoint` asserts. Any hints how to proceed here? Maybe an example for such CFG node somewhere?
>> 
>> Otherwise, I'd think keeping Blackhole a `MultiNode` and then take the control projection off it -- like in my `blackhole-cfg-1.patch` above -- is the way to do it.
>
> Yeah, I agree that your `blackhole-cfg-1.patch` is the lowest friction way to achieve the goal.
> 
> There are some pure control nodes (e.g., `Region`), but they are treated specially during code motion. So, special cases for `Blackhole` would be needed there.

All right, I pushed the version that does `MultiNode` and passes all my tests.

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

PR: https://git.openjdk.org/jdk/pull/11041


More information about the hotspot-compiler-dev mailing list