RFR: 8284848: C2: Compiler blackhole arguments should be treated as globally escaping
Aleksey Shipilev
shade at openjdk.java.net
Wed Apr 13 17:44:17 UTC 2022
On Wed, 13 Apr 2022 17:33:27 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> WIP so far, but I would appreciate early review of someone savvy in C2 EA code. I'll try to whip up the test with IR Framework too.
>>
>> See more discussion in the bug.
>>
>> Additional testing:
>> - [x] Linux x86_64 fastdebug `tier1`
>> - [x] Linux x86_64 fastdebug `tier2`
>> - [x] OpenJDK microbenchmark corpus sanity run
>
> src/hotspot/share/opto/escape.cpp line 825:
>
>> 823: set_escape_state(ptn, PointsToNode::GlobalEscape NOT_PRODUCT(COMMA "blackhole"));
>> 824: }
>> 825: add_edge(n_ptn, ptn);
>
> Why not use `add_local_var_and_edge()` here?
Because the input for the node might not be a `LocalVar` already, but rather `Field`, `Arraycopy`, etc. `add_local_var_and_edge` checks this and fails on asserts. AFAICS, this is only safe to do for the node "output", but here we handle the node inputs. Maybe I should instead do what `Op_Phi` does?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8228
More information about the hotspot-compiler-dev
mailing list