RFR: 8280541: remove self-recursion of ConnectionGraph::find_inst_mem() [v2]
Xin Liu
xliu at openjdk.java.net
Wed Feb 2 07:12:47 UTC 2022
> This is a follow-up task of JDK-8276219.
>
> ConnectionGraph::find_inst_mem() contains a self-recursion for MergeMemNode.
> It drills down into one input of MergeMemNode and tries to locate the memory node
> which has the exact alias_idx. Once it returns, the result won't change from
> recursion. Therefore, it's not necessary to use recursion in this case. We can
> reset the initial state of this function and respin.
>
> We can use a collection to remember all MergeMem Nodes and update them after then.
>
> This patch also makes a cleanup in MergeMemNode::memory_at(). C is not in use in
> that function.
Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
Add an assertion in debug build.
This patch ensures the result is same as recursion.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7204/files
- new: https://git.openjdk.java.net/jdk/pull/7204/files/ae0d0217..b9d40925
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7204&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7204&range=00-01
Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7204.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7204/head:pull/7204
PR: https://git.openjdk.java.net/jdk/pull/7204
More information about the hotspot-compiler-dev
mailing list