< prev index next >
src/hotspot/share/opto/loopnode.cpp
Print this page
rev 49816 : 8201532: Update idom to get correct dom depth calculation
Summary: Assert due to dom depth calculation on old idom
Reviewed-by:
@@ -3216,14 +3216,20 @@
// the dom tree from each node marked "no depth yet", and computes
// the depth on the way back down.
void PhaseIdealLoop::recompute_dom_depth() {
uint no_depth_marker = C->unique();
uint i;
- // Initialize depth to "no depth yet"
+ // Initialize depth to "no depth yet" and realize all lazy updates
for (i = 0; i < _idom_size; i++) {
+ // Only indices with a _dom_depth has a Node* or NULL (otherwise uninitalized).
if (_dom_depth[i] > 0 && _idom[i] != NULL) {
_dom_depth[i] = no_depth_marker;
+
+ // heal _idom if it has a fwd mapping in _nodes
+ if (_idom[i]->in(0) == NULL) {
+ idom(i);
+ }
}
}
if (_dom_stk == NULL) {
uint init_size = C->live_nodes() / 100; // Guess that 1/100 is a reasonable initial size.
if (init_size < 10) init_size = 10;
< prev index next >