src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6889300 Cdiff src/share/vm/opto/cfgnode.cpp
src/share/vm/opto/cfgnode.cpp
Print this page
*** 1529,1538 ****
--- 1529,1540 ----
// This means we have to use type_or_null to defend against untyped regions.
if( phase->type_or_null(r) == Type::TOP ) // Dead code?
return NULL; // No change
Node *top = phase->C->top();
+ bool new_phi = (outcnt() == 0); // transforming new Phi
+ assert(!can_reshape || !new_phi, "for igvn new phi should be hooked");
// The are 2 situations when only one valid phi's input is left
// (in addition to Region input).
// One: region is not loop - replace phi with this input.
// Two: region is loop - replace phi with top since this data path is dead
*** 1548,1557 ****
--- 1550,1565 ----
progress = this; // Record progress
}
}
}
+ if (can_reshape && outcnt() == 0) {
+ // set_req() above may kill outputs if Phi is referenced
+ // only by itself on the dead (top) control path.
+ return top;
+ }
+
Node* uin = unique_input(phase);
if (uin == top) { // Simplest case: no alive inputs.
if (can_reshape) // IGVN transformation
return top;
else
*** 1682,1693 ****
// compress paths and change unreachable cycles to TOP
// If not, we can update the input infinitely along a MergeMem cycle
// Equivalent code is in MemNode::Ideal_common
Node *m = phase->transform(n);
if (outcnt() == 0) { // Above transform() may kill us!
! progress = phase->C->top();
! break;
}
// If transformed to a MergeMem, get the desired slice
// Otherwise the returned node represents memory for every slice
Node *new_mem = (m->is_MergeMem()) ?
m->as_MergeMem()->memory_at(alias_idx) : m;
--- 1690,1700 ----
// compress paths and change unreachable cycles to TOP
// If not, we can update the input infinitely along a MergeMem cycle
// Equivalent code is in MemNode::Ideal_common
Node *m = phase->transform(n);
if (outcnt() == 0) { // Above transform() may kill us!
! return top;
}
// If transformed to a MergeMem, get the desired slice
// Otherwise the returned node represents memory for every slice
Node *new_mem = (m->is_MergeMem()) ?
m->as_MergeMem()->memory_at(alias_idx) : m;
src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File