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

Xin Liu xliu at openjdk.org
Mon Jun 20 22:56:50 UTC 2022


On Mon, 20 Jun 2022 07:11:13 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/parse.hpp line 643:
> 
>> 641:   // if _path has only one predecessor, it is trivial if this block is small(1~2 bytecodes)
>> 642:   // or if _path has more than one predecessor and has been parsed, _unc does not mask out any real code.
>> 643:   bool is_trivial() const {
> 
> But these properties are not checked by the method, right?
> 
> Also, the code is only used in debug, should it be guarded?

> Looks good overall. Some comments/questions:
> 
>     * Why can't we remove traps that have been modified?
>
In previous revision, I did remove them. Vladimir discovered a special case in tier2.  C2 postponed to do fold-compares until IGVN2. Even though this corner case has been solved in JDK-8287840, I think it's good idea to leave it as a fallback.

 
>     * I'm wondering how useful `Compile::print_statistics()` really is. Is it worth extending it? Is anyone using it?
> 
fair enough. I used them to see how many unstable_if traps are 'trivial'. I think I can remove them now.

>     * Do you need to check for unstable if traps in `Node::destruct`?

thanks for the head-up. technically speaking, yes. in reality, I don't think we call "Node::destruct" for a uncommon_trap.  I will patch it up.

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

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


More information about the hotspot-compiler-dev mailing list