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

Zhiqiang Zang duke at openjdk.java.net
Sun Dec 12 19:12:16 UTC 2021


On Sat, 11 Dec 2021 16:32:54 GMT, Mai Đặng Quân Anh <duke at openjdk.java.net> wrote:

> We actually don't need those since `(x - c) + (c - y)` would be transformed into `(x + c) - (c + y)` which will be transformed into `x - y` anyway. So you can safely remove them completely.
> 
> https://github.com/openjdk/jdk/blob/10a51fdb05abe7f7be76a9c442bd4564b24010de/src/hotspot/share/opto/subnode.cpp#L256

Thank you for pointing this out! I have two questions:

1. Should I just go ahead and delete these two, (a - b) + (b - c) and (a - b) + (c - a), in this pr?

2. I do see you are familiar with the concatenation of different optimizations. I was wondering where I am able to find more information about the order the functions are called, for example Ideal(), Value(), Identity(), or even better the entire workflow of optimization.

Thank you very much!

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

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


More information about the hotspot-compiler-dev mailing list