src/share/vm/opto/macro.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/macro.cpp	Mon Apr  6 14:57:07 2009
--- new/src/share/vm/opto/macro.cpp	Mon Apr  6 14:57:07 2009

*** 804,815 **** --- 804,814 ---- #endif _igvn.replace_node(mem_proj, mem); } } else if (use->is_AddP()) { // raw memory addresses used only by the initialization ! _igvn.hash_delete(use); _igvn.subsume_node(use, C->top()); ! _igvn.replace_node(use, C->top()); } else { assert(false, "only Initialize or AddP expected"); } j -= (oc1 - _resproj->outcnt()); }
*** 1289,1300 **** --- 1288,1298 ---- if (_fallthroughcatchproj != NULL) { ctrl = _fallthroughcatchproj->clone(); transform_later(ctrl); ! _igvn.hash_delete(_fallthroughcatchproj); _igvn.subsume_node(_fallthroughcatchproj, result_region); ! _igvn.replace_node(_fallthroughcatchproj, result_region); } else { ctrl = top(); } Node *slow_result; if (_resproj == NULL) {
*** 1301,1312 **** --- 1299,1309 ---- // no uses of the allocation result slow_result = top(); } else { slow_result = _resproj->clone(); transform_later(slow_result); ! _igvn.hash_delete(_resproj); _igvn.subsume_node(_resproj, result_phi_rawoop); ! _igvn.replace_node(_resproj, result_phi_rawoop); } // Plug slow-path into result merge point result_region ->init_req( slow_result_path, ctrl ); result_phi_rawoop->init_req( slow_result_path, slow_result);
*** 1611,1655 **** --- 1608,1645 ---- // Seach for MemBarAcquire node and delete it also. MemBarNode* membar = fallthroughproj->unique_ctrl_out()->as_MemBar(); assert(membar != NULL && membar->Opcode() == Op_MemBarAcquire, ""); Node* ctrlproj = membar->proj_out(TypeFunc::Control); Node* memproj = membar->proj_out(TypeFunc::Memory); ! _igvn.hash_delete(ctrlproj); ! _igvn.subsume_node(ctrlproj, fallthroughproj); _igvn.hash_delete(memproj); _igvn.subsume_node(memproj, memproj_fallthrough); ! _igvn.replace_node(ctrlproj, fallthroughproj); ! _igvn.replace_node(memproj, memproj_fallthrough); // Delete FastLock node also if this Lock node is unique user // (a loop peeling may clone a Lock node). Node* flock = alock->as_Lock()->fastlock_node(); if (flock->outcnt() == 1) { assert(flock->unique_out() == alock, "sanity"); ! _igvn.hash_delete(flock); _igvn.subsume_node(flock, top()); ! _igvn.replace_node(flock, top()); } } // Seach for MemBarRelease node and delete it also. if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() && ctrl->in(0)->is_MemBar()) { MemBarNode* membar = ctrl->in(0)->as_MemBar(); assert(membar->Opcode() == Op_MemBarRelease && mem->is_Proj() && membar == mem->in(0), ""); ! _igvn.hash_delete(fallthroughproj); ! _igvn.subsume_node(fallthroughproj, ctrl); _igvn.hash_delete(memproj_fallthrough); _igvn.subsume_node(memproj_fallthrough, mem); ! _igvn.replace_node(fallthroughproj, ctrl); ! _igvn.replace_node(memproj_fallthrough, mem); fallthroughproj = ctrl; memproj_fallthrough = mem; ctrl = membar->in(TypeFunc::Control); mem = membar->in(TypeFunc::Memory); } ! _igvn.hash_delete(fallthroughproj); ! _igvn.subsume_node(fallthroughproj, ctrl); _igvn.hash_delete(memproj_fallthrough); _igvn.subsume_node(memproj_fallthrough, mem); ! _igvn.replace_node(fallthroughproj, ctrl); ! _igvn.replace_node(memproj_fallthrough, mem); return true; } //------------------------------expand_lock_node----------------------
*** 1877,1893 **** --- 1867,1882 ---- _igvn.hash_delete(_fallthroughproj); _fallthroughproj->disconnect_inputs(NULL); region->init_req(1, slow_ctrl); // region inputs are now complete transform_later(region); ! _igvn.subsume_node(_fallthroughproj, region); ! _igvn.replace_node(_fallthroughproj, region); Node *memproj = transform_later( new(C, 1) ProjNode(call, TypeFunc::Memory) ); mem_phi->init_req(1, memproj ); transform_later(mem_phi); ! _igvn.hash_delete(_memproj_fallthrough); _igvn.subsume_node(_memproj_fallthrough, mem_phi); ! _igvn.replace_node(_memproj_fallthrough, mem_phi); } //------------------------------expand_unlock_node---------------------- void PhaseMacroExpand::expand_unlock_node(UnlockNode *unlock) {
*** 1941,1958 **** --- 1930,1946 ---- _igvn.hash_delete(_fallthroughproj); _fallthroughproj->disconnect_inputs(NULL); region->init_req(1, slow_ctrl); // region inputs are now complete transform_later(region); ! _igvn.subsume_node(_fallthroughproj, region); ! _igvn.replace_node(_fallthroughproj, region); Node *memproj = transform_later( new(C, 1) ProjNode(call, TypeFunc::Memory) ); mem_phi->init_req(1, memproj ); mem_phi->init_req(2, mem); transform_later(mem_phi); ! _igvn.hash_delete(_memproj_fallthrough); _igvn.subsume_node(_memproj_fallthrough, mem_phi); ! _igvn.replace_node(_memproj_fallthrough, mem_phi); } //------------------------------expand_macro_nodes---------------------- // Returns true if a failure occurred. bool PhaseMacroExpand::expand_macro_nodes() {
*** 1967,1979 **** --- 1955,1965 ---- bool success = false; debug_only(int old_macro_count = C->macro_count();); if (n->is_AbstractLock()) { success = eliminate_locking_node(n->as_AbstractLock()); } else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) { ! _igvn.add_users_to_worklist(n); _igvn.hash_delete(n); _igvn.subsume_node(n, n->in(1)); ! _igvn.replace_node(n, n->in(1)); success = true; } assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count"); progress = progress || success; }

src/share/vm/opto/macro.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File