RFR: 8286104: use aggressive liveness for unstable_if traps [v12]

Xin Liu xliu at openjdk.org
Mon Jun 20 22:26:42 UTC 2022


On Mon, 20 Jun 2022 07:24:51 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   monior change for code style.
>
> src/hotspot/share/opto/compile.cpp line 1929:
> 
>> 1927:     int next_bci = trap->next_bci();
>> 1928: 
>> 1929:     if (next_bci != -1 && !trap->modified()) {
> 
> How can it be already modified? We are only processing each trap once, right?

Correct. there is only one pass right now. so it's redundant.

I discussed this with Vladimir Kozlov.  Technically, we can run it after 'inline_incrementally()" as well.  I think we can add it when we prove this optimization is stable. "!trap->modified()" can dedup for that.

> src/hotspot/share/opto/parse.hpp line 609:
> 
>> 607: //   1. suppress trivial Unstable_If traps
>> 608: //   2. use next_bci of _path to update live locals.
>> 609: class UnstableIfTrap {
> 
> What about moving this information into `CallStaticJavaNode`?

I think CallStaticJavaNode is popular.  uncommon_trap/unstable_if is just a special case. that's why factor out and use a dedicated class for it.

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

PR: https://git.openjdk.org/jdk/pull/8545


More information about the hotspot-compiler-dev mailing list