RFR: 8317818: Combinatorial explosion during 'this' escape analysis
Archie Cobbs
acobbs at openjdk.org
Tue Oct 10 17:02:37 UTC 2023
The `this-escape` analysis stops infinite recursions during the analysis by keeping track of what methods have already been invoked with any given set of current references.
However, it was using the method call site, not the target method itself, for this tracking. This can lead to a combinatorial explosion, for example, if there are multiple recursive calls inside the target method, where we would end up recursing through all possible combinations of call sites before stopping the recursion.
The fix is to key on the target method itself, not on whatever call site.
-------------
Commit messages:
- Track 'this-escape' recursion by target method, not by call site.
Changes: https://git.openjdk.org/jdk/pull/16125/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16125&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8317818
Stats: 32 lines in 2 files changed: 30 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/16125.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16125/head:pull/16125
PR: https://git.openjdk.org/jdk/pull/16125
More information about the compiler-dev
mailing list