# HG changeset patch # User adlertz # Date 1382730010 25200 # Node ID 7ae254fd0b3cb1feb43f67b97dbdf0e653719d1c # Parent f01788f136967806e7825b56fd1157bbb7fd5f89# Parent cbe8ba0fb8fc28d5e8a872816c6dacb839f97b47 Merge diff -r cbe8ba0fb8fc -r 7ae254fd0b3c src/share/vm/opto/postaloc.cpp --- a/src/share/vm/opto/postaloc.cpp Thu Oct 24 16:26:31 2013 -0700 +++ b/src/share/vm/opto/postaloc.cpp Fri Oct 25 12:40:10 2013 -0700 @@ -97,7 +97,8 @@ static bool expected_yanked_node(Node *old, Node *orig_old) { // This code is expected only next original nodes: // - load from constant table node which may have next data input nodes: - // MachConstantBase, Phi, MachTemp, MachSpillCopy + // MachConstantBase, MachTemp, MachSpillCopy + // - Phi nodes that are considered Junk // - load constant node which may have next data input nodes: // MachTemp, MachSpillCopy // - MachSpillCopy @@ -112,7 +113,9 @@ return (old == orig_old); } else if (old->is_MachTemp()) { return orig_old->is_Con(); - } else if (old->is_Phi() || old->is_MachConstantBase()) { + } else if (old->is_Phi()) { // Junk phi's + return true; + } else if (old->is_MachConstantBase()) { return (orig_old->is_Con() && orig_old->is_MachConstant()); } return false; @@ -522,11 +525,9 @@ u = u ? NodeSentinel : x; // Capture unique input, or NodeSentinel for 2nd input } if (u != NodeSentinel) { // Junk Phi. Remove - block->remove_node(j--); + phi->replace_by(u); + j -= yank_if_dead(phi, block, &value, ®nd); phi_dex--; - _cfg.unmap_node_from_block(phi); - phi->replace_by(u); - phi->disconnect_inputs(NULL, C); continue; } // Note that if value[pidx] exists, then we merged no new values here