RFR: 8296545: C2 Blackholes should allow load optimizations [v2]
Vladimir Ivanov
vlivanov at openjdk.org
Fri Nov 11 01:06:31 UTC 2022
On Thu, 10 Nov 2022 15:21:32 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>>> can probably even be Node, if I understand how should control-output-only nodes be defined
>>
>> Yes, `MultiNode` is specifically for cases when a node produces multiple results.
>>
>> FTR I looked through the code base for `is_MemBar` usages and didn't spot any problematic cases, if you clear away memory input. But I'm fine with keeping it a membar.
>
> 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.
-------------
PR: https://git.openjdk.org/jdk/pull/11041
More information about the hotspot-compiler-dev
mailing list