[13] RFR(S): 8223581: C2 compilation failed with assert(!q->is_MergeMem())

Tobias Hartmann tobias.hartmann at oracle.com
Wed May 22 09:35:32 UTC 2019


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8223581
http://cr.openjdk.java.net/~thartmann/8223581/webrev.00/

We hit an assert during parsing with incremental inlining when merging memory edges into a target
block because of a MergeMem that has another MergeMem as input. The root cause is the same as with
8221592 [1]: After the fix for 8059241 [2], we don't always execute a round of PhaseRemoveUseless /
IGVN after incremental inlining and as a result, MergeMems that feed into other MergeMems are not
cleaned immediately (but they are on the IGVN worklist and will be cleaned up eventually).

To not confuse the parser, we need to remove them eagerly. This is already done in
GraphKit::replace_call() for the non-exceptional memory edge but the implementation misses to also
handle the exceptional case.

Instead of a Node_List, I'm now using a Unique_Node_List to avoid the costly contains() call that
has O(n) complexity.

I've verified the fix by many runs of the api/java_lang JCK tests and testing on relevant tiers.

Thanks,
Tobias

[1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-April/033505.html
[2] https://bugs.openjdk.java.net/browse/JDK-8059241


More information about the hotspot-compiler-dev mailing list