RFR: 8278471: Reorder optimizations in addnode Ideal [v3]

Jie Fu jiefu at openjdk.java.net
Tue Dec 14 08:23:16 UTC 2021


On Mon, 13 Dec 2021 18:24:42 GMT, Zhiqiang Zang <duke at openjdk.java.net> wrote:

>> Reorder optimizations in addnode so special cases appear before general cases; otherwise the special cases would be never covered.
>> 
>> `(a - b) + (c - d)` subsumes both `(a - b) + (b - c)` and `(a - b) + (c - a)`. Therefore `(a - b) + (b - c)` and `(a - b) + (c - a)` have to be placed before `(a - b) + (c - d)` so that they can work.
>
> Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unnecessary optimizations.

LGTM

The removed rules actually never be reached before.
So removing them won't make performance any worse.

And the removed opts are already done by (AddNode::IdealIL + SubINode::Ideal).

However, it would be better to change the JBS title as something like 'Remove unreached rules in AddNode::IdealIL'
Thanks.

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

Marked as reviewed by jiefu (Reviewer).

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


More information about the hotspot-compiler-dev mailing list