RFR(S): 8193070: [MVT] PhaseIdealLoop::get_ctrl() fails with "assert(ctrl->is_CFG())"

Tobias Hartmann tobias.hartmann at oracle.com
Wed Dec 6 20:23:08 UTC 2017


Hi,

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

During loop optimizations, ValueTypeNode::remove_redundant_allocations() searches for value type allocations that are
dominated by other allocations of the same type and removes these redundant allocations. The catchall_catchproj is
replaced by top which may confuse loop optimizations because dead nodes that previously had the catchproj as control now
have top as control. The problem is that these dead parts of the graph are only aggressively cut off in the next IGVN
phase but not during loop optimizations.

I've fixed this by moving the replacements code to AllocateNode::Ideal() and limited it to value type allocations
because otherwise [1] fails (no InstantiationException is thrown because the allocation is completely removed - I wonder
if that wouldn't be legal though?).

I've verified the fix with replay compilation. All tests pass.

Thanks,
Tobias

[1] test/hotspot/jtreg/runtime/Unsafe/AllocateInstance.java


More information about the valhalla-dev mailing list