src/share/vm/opto/macro.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6895383 Cdiff src/share/vm/opto/macro.cpp
src/share/vm/opto/macro.cpp
Print this page
*** 314,323 ****
--- 314,342 ----
return mem;
} else {
assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
}
mem = mem->in(MemNode::Memory);
+ } else if (mem->Opcode() == Op_ClearArray) {
+ intptr_t offset;
+ AllocateNode* clear_alloc = AllocateNode::Ideal_allocation(mem->in(3), phase, offset);
+ // We can not bypass initialization of the instance we are looking for
+ // or when something is wrong.
+ if (clear_alloc == NULL)
+ return mem;
+ InitializeNode* init = clear_alloc->initialization();
+ if (clear_alloc == alloc) {
+ // We are looking for value, return Initialize node.
+ assert(init != NULL, "should have");
+ return init;
+ } else {
+ // Otherwise skip it.
+ if (init != NULL)
+ mem = init->in(TypeFunc::Memory);
+ else
+ mem = clear_alloc->in(TypeFunc::Memory);
+ }
} else if (mem->Opcode() == Op_SCMemProj) {
assert(mem->in(0)->is_LoadStore(), "sanity");
const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr();
int adr_idx = Compile::current()->get_alias_index(atype);
if (adr_idx == alias_idx) {
*** 821,830 ****
--- 840,861 ----
if (use->is_AddP()) {
for (DUIterator_Last kmin, k = use->last_outs(kmin); k >= kmin; ) {
Node *n = use->last_out(k);
uint oc2 = use->outcnt();
if (n->is_Store()) {
+ #ifdef ASSERT
+ // Verify that there is no dependent MemBarVolatile nodes,
+ // they should be removed during IGVN, see MemBarNode::Ideal().
+ for (DUIterator_Fast pmax, p = n->fast_outs(pmax);
+ p < pmax; p++) {
+ Node* mb = n->fast_out(p);
+ assert(mb->is_Initialize() || !mb->is_MemBar() ||
+ mb->req() <= MemBarNode::Precedent ||
+ mb->in(MemBarNode::Precedent) != n,
+ "MemBarVolatile should be eliminated for non-escaping object");
+ }
+ #endif
_igvn.replace_node(n, n->in(MemNode::Memory));
} else {
eliminate_card_mark(n);
}
k -= (oc2 - use->outcnt());
src/share/vm/opto/macro.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File