RFR: 8344213: Cleanup OpaqueLoop*Node verification code for Assertion Predicates [v2]
Christian Hagedorn
chagedorn at openjdk.org
Mon Nov 25 10:02:37 UTC 2024
On Fri, 22 Nov 2024 11:20:49 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Apply suggestions from code review
>>
>> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>
> src/hotspot/share/opto/node.hpp line 2139:
>
>> 2137:
>> 2138: public:
>> 2139: explicit DataNodeBFS(BFSActions& bfs_action) : _bfs_actions(bfs_action) {}
>
> Is this restricted to data-nodes? If so, you should verify that the `start_node` is a data node. But we could also generalize this to any BFS, and then check in `should_visit` if it is a data node of CFG.
>
> You should also say that it traverses inputs/def, not outputs/uses.
Yes, it should only visit data nodes. Good point about generalizing it to any BFS, including CFG nodes. I gave it a shot (see new commit) but limited the patch to an input-only BFS (I guess it could be extended to an output-including or input/ouput-selecting BFS as well at some point but we should have a use case first).
For now, I'm only defining a `DataNodeInputsBFS` but provided a simple way to add a `CFGNodeInputsBFS` or a "any node" `NodeInputsBFS` later (again, I'm leaving these additional implementation out of this patch since we should first have a use case - but should be simple to add).
Let me know what you think.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22136#discussion_r1856278138
More information about the hotspot-compiler-dev
mailing list