RFR: 8324775: C2 SuperWord: refactor visited sets [v2]
Emanuel Peter
epeter at openjdk.org
Sat Jan 27 05:13:36 UTC 2024
On Sat, 27 Jan 2024 05:10:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Subtask of https://github.com/openjdk/jdk/pull/16620
>>
>> Currently, the visited set is a "global" set that is reused all through SuperWord:
>> `_visited`, `_post_visited`, and also `_stk`.
>>
>> This makes other refactorings difficult. I am refactoring all related code to make the visited sets local, with use of ResourceMark.
>>
>> I am also refactoring the `independent` queries: from using recursive function calls to iterative. This is necessary, unless we want to pass the visited set around into the recursive calls (I think not!)
>>
>> At the same time, I wanted the code of `find_dependence` to become easier, and closer to `independent`, hence I re-defined it to `mutually_independent`, and had to slightly adapt also its usages.
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>
> comment improvement by Vladimir
src/hotspot/share/opto/superword.cpp line 1110:
> 1108: }
> 1109:
> 1110: // Are all nodes in nodes mutually independent?
Suggestion:
// Are all nodes in nodes list mutually independent?
src/hotspot/share/opto/superword.hpp line 452:
> 450: // Is there no data path from s1 to s2 or s2 to s1?
> 451: bool independent(Node* s1, Node* s2);
> 452: // Are all nodes in nodes mutually independent?
Suggestion:
// Are all nodes in nodes list mutually independent?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17594#discussion_r1468344947
PR Review Comment: https://git.openjdk.org/jdk/pull/17594#discussion_r1468344729
More information about the hotspot-compiler-dev
mailing list