RFR: 8252505: C1/C2 compiler support for blackholes
Andrew Dinn
adinn at openjdk.java.net
Wed Nov 25 14:26:59 UTC 2020
On Wed, 25 Nov 2020 11:56:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Is there a guide rail how to do that? Because I cannot see how we can "reduce to nothing" during matching.
Sorry, I should have said 'generated code' not 'generated matcher code'. I wasn't actually thinking of doing anything different during matching per se.
What I thought was you could do something different at emit time. One way would be to redefine the logic of the call node's (generated) emit method. If that code tested the method it was being asked to call and found it marked as a black hole then it could skip executing the emit statements culled from matching rules. That would involve changing the code in adlc/output_c/h.cpp. It might perhaps also require tweaking the code in adlc/formssel.cpp/hpp.
Anyway, given what @iwanowww has said this may be the wrong way to go about it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1203
More information about the hotspot-compiler-dev
mailing list