Node::find(int) should not traverse from new to old nodes
vladimir.kozlov at oracle.com
vladimir.kozlov at oracle.com
Thu May 5 16:16:45 UTC 2022
I think the original intention to search in old IR is to find any node
with specified index. But you are right about inconsistency of
implementation.
I prefer to have a separate search of old nodes in separate
find_old_node() method and remove such search from default find_node()
(your Solution 1). It is still useful to look through old IR when debug.
Thanks,
Vladimir K
On 5/5/22 2:25 AM, Emanuel Peter wrote:
> Hi,
>
> I have been bothered by find_node(idx) for a while. When I am looking at the Mach graph, and search for a node with an idx, I sometimes get old, sometimes new nodes. The reason is that Node::find does not just traverse input/output edges, but also debug_orig (if ASSERT is enabled). Via debug_orig, most Mach nodes link to their old node from the IR of previous phases. This way we can find multiple nodes for an idx. Node::find returns the last one it finds - sometimes the new one is last, sometimes the old one is last. At least it prints both pointers to the terminal.
>
> Here, I have a detailed writeup, and some proposed solutions:
> https://bugs.openjdk.java.net/browse/JDK-8286179
>
> Do you agree that we should fix this? Would you pick one of my solutions, or propose a new one?
> Since this is a tool that probably many people are using for debugging, I do not want to break it for you.
>
> Best Regards,
> Emanuel Peter
More information about the hotspot-compiler-dev
mailing list