comparison src/share/vm/opto/phaseX.cpp @ 8116:6931f425c517

8007294: ReduceFieldZeroing doesn't check for dependent load and can lead to incorrect execution Summary: InitializeNode::can_capture_store() must check that the captured store doesn't overwrite a memory location that is loaded before the store. Reviewed-by: kvn
author roland
date Mon, 25 Feb 2013 14:13:04 +0100
parents 8b3da8d14c93
children 30f42e691e70
comparison
equal deleted inserted replaced
8097:be1fbee20765 8116:6931f425c517
1195 i++; 1195 i++;
1196 } 1196 }
1197 assert(!(i < imax), "sanity"); 1197 assert(!(i < imax), "sanity");
1198 } 1198 }
1199 } 1199 }
1200 if (ReduceFieldZeroing && dead->is_Load() && i == MemNode::Memory &&
1201 in->is_Proj() && in->in(0) != NULL && in->in(0)->is_Initialize()) {
1202 // A Load that directly follows an InitializeNode is
1203 // going away. The Stores that follow are candidates
1204 // again to be captured by the InitializeNode.
1205 for (DUIterator_Fast jmax, j = in->fast_outs(jmax); j < jmax; j++) {
1206 Node *n = in->fast_out(j);
1207 if (n->is_Store()) {
1208 _worklist.push(n);
1209 }
1210 }
1211 }
1200 } 1212 }
1201 } 1213 }
1202 C->record_dead_node(dead->_idx); 1214 C->record_dead_node(dead->_idx);
1203 if (dead->is_macro()) { 1215 if (dead->is_macro()) {
1204 C->remove_macro_node(dead); 1216 C->remove_macro_node(dead);