comparison src/share/vm/opto/loopTransform.cpp @ 6906:521c82b9cbf8

7198606: Improve VM optimization Summary: Remove incorrect code in OptimizeFill optimization. Reviewed-by: roland, twisti
author kvn
date Wed, 19 Sep 2012 13:58:31 -0700
parents 0acd345fd810
children 218a94758fe7 b95ad0610fef
comparison
equal deleted inserted replaced
6905:e4d10261499c 6906:521c82b9cbf8
2714 result_ctrl = new (C, 1) ProjNode(call,TypeFunc::Control); 2714 result_ctrl = new (C, 1) ProjNode(call,TypeFunc::Control);
2715 _igvn.register_new_node_with_optimizer(result_ctrl); 2715 _igvn.register_new_node_with_optimizer(result_ctrl);
2716 result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); 2716 result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory);
2717 _igvn.register_new_node_with_optimizer(result_mem); 2717 _igvn.register_new_node_with_optimizer(result_mem);
2718 2718
2719 /* Disable following optimization until proper fix (add missing checks).
2720
2719 // If this fill is tightly coupled to an allocation and overwrites 2721 // If this fill is tightly coupled to an allocation and overwrites
2720 // the whole body, allow it to take over the zeroing. 2722 // the whole body, allow it to take over the zeroing.
2721 AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); 2723 AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this);
2722 if (alloc != NULL && alloc->is_AllocateArray()) { 2724 if (alloc != NULL && alloc->is_AllocateArray()) {
2723 Node* length = alloc->as_AllocateArray()->Ideal_length(); 2725 Node* length = alloc->as_AllocateArray()->Ideal_length();
2737 length->dump(); 2739 length->dump();
2738 } 2740 }
2739 #endif 2741 #endif
2740 } 2742 }
2741 } 2743 }
2744 */
2742 2745
2743 // Redirect the old control and memory edges that are outside the loop. 2746 // Redirect the old control and memory edges that are outside the loop.
2744 Node* exit = head->loopexit()->proj_out(0); 2747 Node* exit = head->loopexit()->proj_out(0);
2745 // Sometimes the memory phi of the head is used as the outgoing 2748 // Sometimes the memory phi of the head is used as the outgoing
2746 // state of the loop. It's safe in this case to replace it with the 2749 // state of the loop. It's safe in this case to replace it with the