RFR: 8252505: C1/C2 compiler support for blackholes

Aleksey Shipilev shade at openjdk.java.net
Wed Nov 25 11:58:55 UTC 2020


On Wed, 25 Nov 2020 10:25:50 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> Modulo the supports_blackholes switch that logic is essentially the same on all platforms, isn't it? Why can you not just fold the relevant case handling into the generated matcher code? Wouldn't that just require a special case switch to decide whether to use the AD file rule to reduce a `CallJavaNode` vs reducing it to nothing?

Is there a guide rail how to do that? Because I cannot see how we can "reduce to nothing" during matching. We still have to match `CallJavaNode` to something, if not to `MachCallJavaNode`. For that, we need `.ad` match rules, AFAICS.

I am exploring if we I can instead do `CallBlackholeNode` as the subclass of `CallJavaNode`, and match it directly. It would also allow ask Matcher if underlying `.ad` supports blackholes by doing `is_match_rule_supported`. It would still add match rules for blackholes to `.ad`-s, but at least it would not need to inject into current match rules.

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

PR: https://git.openjdk.java.net/jdk/pull/1203


More information about the hotspot-compiler-dev mailing list