Mercurial > hg > truffle
diff src/share/vm/opto/memnode.cpp @ 570:dca06e7f503d
Merge
author | kvn |
---|---|
date | Tue, 17 Feb 2009 14:30:24 -0800 |
parents | 82a980778b92 3b5ac9e7e6ea |
children | 0fbdb4381b99 5d75ab5f6698 |
line wrap: on
line diff
--- a/src/share/vm/opto/memnode.cpp Tue Feb 10 18:39:09 2009 +0300 +++ b/src/share/vm/opto/memnode.cpp Tue Feb 17 14:30:24 2009 -0800 @@ -779,14 +779,14 @@ "use LoadRangeNode instead"); switch (bt) { case T_BOOLEAN: - case T_BYTE: return new (C, 3) LoadBNode(ctl, mem, adr, adr_type, rt->is_int() ); - case T_INT: return new (C, 3) LoadINode(ctl, mem, adr, adr_type, rt->is_int() ); - case T_CHAR: return new (C, 3) LoadCNode(ctl, mem, adr, adr_type, rt->is_int() ); - case T_SHORT: return new (C, 3) LoadSNode(ctl, mem, adr, adr_type, rt->is_int() ); - case T_LONG: return new (C, 3) LoadLNode(ctl, mem, adr, adr_type, rt->is_long() ); - case T_FLOAT: return new (C, 3) LoadFNode(ctl, mem, adr, adr_type, rt ); - case T_DOUBLE: return new (C, 3) LoadDNode(ctl, mem, adr, adr_type, rt ); - case T_ADDRESS: return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr() ); + case T_BYTE: return new (C, 3) LoadBNode (ctl, mem, adr, adr_type, rt->is_int() ); + case T_INT: return new (C, 3) LoadINode (ctl, mem, adr, adr_type, rt->is_int() ); + case T_CHAR: return new (C, 3) LoadUSNode(ctl, mem, adr, adr_type, rt->is_int() ); + case T_SHORT: return new (C, 3) LoadSNode (ctl, mem, adr, adr_type, rt->is_int() ); + case T_LONG: return new (C, 3) LoadLNode (ctl, mem, adr, adr_type, rt->is_long() ); + case T_FLOAT: return new (C, 3) LoadFNode (ctl, mem, adr, adr_type, rt ); + case T_DOUBLE: return new (C, 3) LoadDNode (ctl, mem, adr, adr_type, rt ); + case T_ADDRESS: return new (C, 3) LoadPNode (ctl, mem, adr, adr_type, rt->is_ptr() ); case T_OBJECT: #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop()) { @@ -1076,13 +1076,14 @@ // of the original value. Node* mem_phi = in(Memory); Node* offset = in(Address)->in(AddPNode::Offset); + Node* region = base->in(0); Node* in1 = clone(); Node* in1_addr = in1->in(Address)->clone(); in1_addr->set_req(AddPNode::Base, base->in(allocation_index)); in1_addr->set_req(AddPNode::Address, base->in(allocation_index)); in1_addr->set_req(AddPNode::Offset, offset); - in1->set_req(0, base->in(allocation_index)); + in1->set_req(0, region->in(allocation_index)); in1->set_req(Address, in1_addr); in1->set_req(Memory, mem_phi->in(allocation_index)); @@ -1091,7 +1092,7 @@ in2_addr->set_req(AddPNode::Base, base->in(load_index)); in2_addr->set_req(AddPNode::Address, base->in(load_index)); in2_addr->set_req(AddPNode::Offset, offset); - in2->set_req(0, base->in(load_index)); + in2->set_req(0, region->in(load_index)); in2->set_req(Address, in2_addr); in2->set_req(Memory, mem_phi->in(load_index)); @@ -1100,7 +1101,7 @@ in2_addr = phase->transform(in2_addr); in2 = phase->transform(in2); - PhiNode* result = PhiNode::make_blank(base->in(0), this); + PhiNode* result = PhiNode::make_blank(region, this); result->set_req(allocation_index, in1); result->set_req(load_index, in2); return result; @@ -1357,7 +1358,7 @@ // Steps (a), (b): Walk past independent stores to find an exact match. if (prev_mem != NULL && prev_mem != in(MemNode::Memory)) { // (c) See if we can fold up on the spot, but don't fold up here. - // Fold-up might require truncation (for LoadB/LoadS/LoadC) or + // Fold-up might require truncation (for LoadB/LoadS/LoadUS) or // just return a prior value, which is done by Identity calls. if (can_see_stored_value(prev_mem, phase)) { // Make ready for step (d): @@ -1606,14 +1607,14 @@ return LoadNode::Ideal(phase, can_reshape); } -//--------------------------LoadCNode::Ideal-------------------------------------- +//--------------------------LoadUSNode::Ideal------------------------------------- // // If the previous store is to the same address as this load, // and the value stored was larger than a char, replace this load // with the value stored truncated to a char. If no truncation is // needed, the replacement is done in LoadNode::Identity(). // -Node *LoadCNode::Ideal(PhaseGVN *phase, bool can_reshape) { +Node *LoadUSNode::Ideal(PhaseGVN *phase, bool can_reshape) { Node* mem = in(MemNode::Memory); Node* value = can_see_stored_value(mem,phase); if( value && !phase->type(value)->higher_equal( _type ) )