RFR: 8257630: ReplacedNodes doesn't handle non-CFG multi nodes
Tobias Hartmann
thartmann at openjdk.java.net
Fri Dec 4 07:27:56 UTC 2020
On Wed, 2 Dec 2020 21:21:19 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> When looking up an immediate CFG node, ReplacedNodes assumes that control input is always a CFG node.
> It's not always the case: for example, a projection on a non-CFG multi node (`SCMemProj` and `LoadStore` respectively).
>
> Proposed fix is to skip projection nodes first before checking for CFG.
>
> Testing:
> - [x] hs-tier1-6 w/ -XX:+AlwaysIncrementalInlining
Looks good.
src/hotspot/share/opto/replacednodes.cpp line 157:
> 155: if (n->is_Proj()) {
> 156: n = n->in(0);
> 157: }
I would suggest to merge this with the if below and adjust the comment to something like:
`// Skip non-CFG nodes. Also skip projections, since some of the multi nodes aren't CFG (e.g., LoadStore and SCMemProj).`
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1580
More information about the hotspot-compiler-dev
mailing list