src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8034216 Cdiff src/share/vm/opto/phaseX.cpp

src/share/vm/opto/phaseX.cpp

Print this page

        

*** 1513,1522 **** --- 1513,1537 ---- void PhaseCCP::do_transform() { // Correct leaves of new-space Nodes; they point to old-space. C->set_root( transform(C->root())->as_Root() ); assert( C->top(), "missing TOP node" ); assert( C->root(), "missing root" ); + + // Eagerly remove castPP nodes here. CastPP nodes might not be + // removed in the subsequent IGVN phase if a node that changes + // in(1) of a castPP is processed prior to the castPP node. + for (uint i = 0; i < _worklist.size(); i++) { + Node* n = _worklist.at(i); + + if (n->is_ConstraintCast()) { + Node* nn = n->Identity(this); + if (nn != n) { + replace_node(n, nn); + _worklist.remove(n); + } + } + } } //------------------------------transform-------------------------------------- // Given a Node in old-space, clone him into new-space. // Convert any of his old-space children into new-space children.
src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File