comparison src/share/vm/opto/memnode.cpp @ 2417:cb162b348743

7032696: Fix for 7029152 broke VM Summary: StrIntrinsicNode::Ideal() should not optimize memory during Parse. Reviewed-by: jrose, never
author kvn
date Thu, 31 Mar 2011 13:22:34 -0700
parents f9424955eb18
children 92add02409c9 66b0e2371912
comparison
equal deleted inserted replaced
2416:38fea01eb669 2417:cb162b348743
2626 // Return a node which is more "ideal" than the current node. Strip out 2626 // Return a node which is more "ideal" than the current node. Strip out
2627 // control copies 2627 // control copies
2628 Node *StrIntrinsicNode::Ideal(PhaseGVN *phase, bool can_reshape) { 2628 Node *StrIntrinsicNode::Ideal(PhaseGVN *phase, bool can_reshape) {
2629 if (remove_dead_region(phase, can_reshape)) return this; 2629 if (remove_dead_region(phase, can_reshape)) return this;
2630 2630
2631 Node* mem = phase->transform(in(MemNode::Memory)); 2631 if (can_reshape) {
2632 // If transformed to a MergeMem, get the desired slice 2632 Node* mem = phase->transform(in(MemNode::Memory));
2633 uint alias_idx = phase->C->get_alias_index(adr_type()); 2633 // If transformed to a MergeMem, get the desired slice
2634 mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem; 2634 uint alias_idx = phase->C->get_alias_index(adr_type());
2635 if (mem != in(MemNode::Memory)) 2635 mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem;
2636 set_req(MemNode::Memory, mem); 2636 if (mem != in(MemNode::Memory)) {
2637 set_req(MemNode::Memory, mem);
2638 return this;
2639 }
2640 }
2637 return NULL; 2641 return NULL;
2638 } 2642 }
2639 2643
2640 //============================================================================= 2644 //=============================================================================
2641 MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent) 2645 MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent)