RFR(S): 8239072: subtype check macro node causes node budget to be exhausted
Roland Westrelin
rwestrel at redhat.com
Mon Mar 9 13:15:46 UTC 2020
http://cr.openjdk.java.net/~roland/8239072/webrev.00/
Running Box2D with nashorn, I sometimes see that C2 bails out from
compilation of the hottest method in the benchmark. It happens at macro
nodes expansion time when C2 verifies it has enough room for macro
expansion:
if (C->check_node_count(C->macro_count() * 300, "out of nodes before macro expansion" ) )
return true;
For this particular method, C2 has hundreds of subtype checks to
expand. Most of them expands to a simple comparison so the 300 factor
above is quite pessimistic in this particular case. I propose
transforming subtype checks to a simpler pattern when possible in
SubTypeCheckNode::Ideal() instead of waiting for macro expansion. I
would like to delay it until loop opts are over because a
SubTypeCheckNode alone rather than a subgraph that feeds into a CmpP is
more suitable for loop opts (split if in particular).
Roland.
More information about the hotspot-compiler-dev
mailing list