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

src/share/vm/opto/memnode.cpp

Print this page




4060 }
4061 #else // !ASSERT
4062 #define verify_memory_slice(m,i,n) (0)  // PRODUCT version is no-op
4063 #endif
4064 
4065 
4066 //-----------------------------memory_at---------------------------------------
4067 Node* MergeMemNode::memory_at(uint alias_idx) const {
4068   assert(alias_idx >= Compile::AliasIdxRaw ||
4069          alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0,
4070          "must avoid base_memory and AliasIdxTop");
4071 
4072   // Otherwise, it is a narrow slice.
4073   Node* n = alias_idx < req() ? in(alias_idx) : empty_memory();
4074   Compile *C = Compile::current();
4075   if (is_empty_memory(n)) {
4076     // the array is sparse; empty slots are the "top" node
4077     n = base_memory();
4078     assert(Node::in_dump()
4079            || n == NULL || n->bottom_type() == Type::TOP

4080            || n->adr_type() == TypePtr::BOTTOM
4081            || n->adr_type() == TypeRawPtr::BOTTOM
4082            || Compile::current()->AliasLevel() == 0,
4083            "must be a wide memory");
4084     // AliasLevel == 0 if we are organizing the memory states manually.
4085     // See verify_memory_slice for comments on TypeRawPtr::BOTTOM.
4086   } else {
4087     // make sure the stored slice is sane
4088     #ifdef ASSERT
4089     if (is_error_reported() || Node::in_dump()) {
4090     } else if (might_be_same(n, base_memory())) {
4091       // Give it a pass:  It is a mostly harmless repetition of the base.
4092       // This can arise normally from node subsumption during optimization.
4093     } else {
4094       verify_memory_slice(this, alias_idx, n);
4095     }
4096     #endif
4097   }
4098   return n;
4099 }




4060 }
4061 #else // !ASSERT
4062 #define verify_memory_slice(m,i,n) (0)  // PRODUCT version is no-op
4063 #endif
4064 
4065 
4066 //-----------------------------memory_at---------------------------------------
4067 Node* MergeMemNode::memory_at(uint alias_idx) const {
4068   assert(alias_idx >= Compile::AliasIdxRaw ||
4069          alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0,
4070          "must avoid base_memory and AliasIdxTop");
4071 
4072   // Otherwise, it is a narrow slice.
4073   Node* n = alias_idx < req() ? in(alias_idx) : empty_memory();
4074   Compile *C = Compile::current();
4075   if (is_empty_memory(n)) {
4076     // the array is sparse; empty slots are the "top" node
4077     n = base_memory();
4078     assert(Node::in_dump()
4079            || n == NULL || n->bottom_type() == Type::TOP
4080            || n->adr_type() == NULL // address is TOP
4081            || n->adr_type() == TypePtr::BOTTOM
4082            || n->adr_type() == TypeRawPtr::BOTTOM
4083            || Compile::current()->AliasLevel() == 0,
4084            "must be a wide memory");
4085     // AliasLevel == 0 if we are organizing the memory states manually.
4086     // See verify_memory_slice for comments on TypeRawPtr::BOTTOM.
4087   } else {
4088     // make sure the stored slice is sane
4089     #ifdef ASSERT
4090     if (is_error_reported() || Node::in_dump()) {
4091     } else if (might_be_same(n, base_memory())) {
4092       // Give it a pass:  It is a mostly harmless repetition of the base.
4093       // This can arise normally from node subsumption during optimization.
4094     } else {
4095       verify_memory_slice(this, alias_idx, n);
4096     }
4097     #endif
4098   }
4099   return n;
4100 }


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