src/share/vm/opto/escape.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/escape.cpp Fri Feb 17 16:23:59 2012
--- new/src/share/vm/opto/escape.cpp Fri Feb 17 16:23:59 2012
*** 2033,2078 ****
--- 2033,2052 ----
if (ini != NULL) {
BasicType ft = UseCompressedOops ? T_NARROWOOP : T_OBJECT;
Node* store = ini->find_captured_store(offset, type2aelembytes(ft), phase);
if (store != NULL && store->is_Store()) {
value = store->in(MemNode::ValueIn);
! } else if (ptn->edge_count() > 0) { // Are there oop stores?
! // Check for a store which follows allocation without branches.
! // There could be initializing stores which follow allocation.
// For example, a volatile field store is not collected
- // by Initialize node. TODO: it would be nice to use idom() here.
//
// Search all references to the same field which use different
// AddP nodes, for example, in the next case:
//
// Point p[] = new Point[1];
// if ( x ) { p[0] = new Point(); p[0].x = x; }
// if ( p[0] != null ) { y = p[0].x; } // has CastPP
//
for (uint next = ei; (next < ae_cnt) && (value == NULL); next++) {
uint fpi = pta->edge_target(next); // Field (AddP)
PointsToNode *ptf = ptnode_adr(fpi);
if (ptf->offset() == offset) {
Node* nf = ptf->_node;
for (DUIterator_Fast imax, i = nf->fast_outs(imax); i < imax; i++) {
store = nf->fast_out(i);
if (store->is_Store() && store->in(0) != NULL) {
Node* ctrl = store->in(0);
while(!(ctrl == ini || ctrl == alloc || ctrl == NULL ||
ctrl == C->root() || ctrl == C->top() || ctrl->is_Region() ||
ctrl->is_IfTrue() || ctrl->is_IfFalse())) {
ctrl = ctrl->in(0);
+ // Need to check for dependent loads to separate such stores from
+ // stores which follow loads. For now, add initial value NULL so
+ // that compare pointers optimization works correctly.
}
if (ctrl == ini || ctrl == alloc) {
value = store->in(MemNode::ValueIn);
break;
}
}
}
}
}
}
}
if (value == NULL || value != ptnode_adr(value->_idx)->_node) {
// A field's initializing value was not recorded. Add NULL.
add_edge_from_fields(alloc->_idx, null_idx, offset);
}
}
src/share/vm/opto/escape.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File