RFR: 8252505: C1/C2 compiler support for blackholes [v11]

Aleksey Shipilev shade at openjdk.java.net
Tue Dec 1 16:01:09 UTC 2020


On Tue, 1 Dec 2020 12:52:38 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> `Matcher::match_sfpt()` has call-specific logic for different shapes. Having a special case for Blackhole which turns `CallBlackhole` into `MachCallBlackhole` fits it well.
> 
> Since every AD instruction has a dedicated class, you can get rid of some additional changes if you customize matching logic for blackhole.

Tried a few approaches, but they seem unsatisfactory. In `Matcher::match_sfpt`, we either need to check for blackhole-ness around `MachNode *m = match_tree(call);` to avoid going for (non-existent) match or recovering in case of expected mismatch of blackhole, or we need to either add the new case before `if( sfpt->is_Call() )` and do the entire thing by ourselves.

Seems easier to just accept simple match rules in `.ad`, to be honest. I don't think maintainability is improved by hacking in blackhole handling in `Matcher::match_sfpt`.

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

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


More information about the hotspot-dev mailing list