comparison src/share/vm/opto/loopTransform.cpp @ 5635:94a83e0f9ce1

8017065: C2 allows safepoint checks to leak into G1 pre-barriers Summary: Make all raw loads strictly respect control dependencies, make sure RCE doesn't move raw loads, add verification of G1 pre-barriers. Reviewed-by: kvn, roland
author iveresov
date Tue, 05 Nov 2013 01:57:18 -0800
parents 60a32bb8ff99
children 55fb97c4c58d
comparison
equal deleted inserted replaced
62:20e0cfa1b20a 63:b1c5db6dc176
1962 assert(iff->is_If(), ""); 1962 assert(iff->is_If(), "");
1963 ProjNode* dp = ((IfNode*)iff)->proj_out(1-flip); 1963 ProjNode* dp = ((IfNode*)iff)->proj_out(1-flip);
1964 // Find loads off the surviving projection; remove their control edge 1964 // Find loads off the surviving projection; remove their control edge
1965 for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) { 1965 for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
1966 Node* cd = dp->fast_out(i); // Control-dependent node 1966 Node* cd = dp->fast_out(i); // Control-dependent node
1967 if( cd->is_Load() ) { // Loads can now float around in the loop 1967 if (cd->is_Load() && cd->depends_only_on_test()) { // Loads can now float around in the loop
1968 // Allow the load to float around in the loop, or before it 1968 // Allow the load to float around in the loop, or before it
1969 // but NOT before the pre-loop. 1969 // but NOT before the pre-loop.
1970 _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL 1970 _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL
1971 --i; 1971 --i;
1972 --imax; 1972 --imax;