2237 igvn.optimize(); 2238 } 2239 2240 print_method(PHASE_ITER_GVN2, 2); 2241 2242 if (failing()) return; 2243 2244 // Loop transforms on the ideal graph. Range Check Elimination, 2245 // peeling, unrolling, etc. 2246 if(loop_opts_cnt > 0) { 2247 debug_only( int cnt = 0; ); 2248 while(major_progress() && (loop_opts_cnt > 0)) { 2249 TracePhase tp("idealLoop", &timers[_t_idealLoop]); 2250 assert( cnt++ < 40, "infinite cycle in loop optimization" ); 2251 PhaseIdealLoop ideal_loop( igvn, true); 2252 loop_opts_cnt--; 2253 if (major_progress()) print_method(PHASE_PHASEIDEALLOOP_ITERATIONS, 2); 2254 if (failing()) return; 2255 } 2256 } 2257 2258 { 2259 // Verify that all previous optimizations produced a valid graph 2260 // at least to this point, even if no loop optimizations were done. 2261 TracePhase tp("idealLoopVerify", &timers[_t_idealLoopVerify]); 2262 PhaseIdealLoop::verify(igvn); 2263 } 2264 2265 { 2266 TracePhase tp("macroExpand", &timers[_t_macroExpand]); 2267 PhaseMacroExpand mex(igvn); 2268 if (mex.expand_macro_nodes()) { 2269 assert(failing(), "must bail out w/ explicit message"); 2270 return; 2271 } 2272 } 2273 2274 DEBUG_ONLY( _modified_nodes = NULL; ) 2275 } // (End scope of igvn; run destructor if necessary for asserts.) 2276 | 2237 igvn.optimize(); 2238 } 2239 2240 print_method(PHASE_ITER_GVN2, 2); 2241 2242 if (failing()) return; 2243 2244 // Loop transforms on the ideal graph. Range Check Elimination, 2245 // peeling, unrolling, etc. 2246 if(loop_opts_cnt > 0) { 2247 debug_only( int cnt = 0; ); 2248 while(major_progress() && (loop_opts_cnt > 0)) { 2249 TracePhase tp("idealLoop", &timers[_t_idealLoop]); 2250 assert( cnt++ < 40, "infinite cycle in loop optimization" ); 2251 PhaseIdealLoop ideal_loop( igvn, true); 2252 loop_opts_cnt--; 2253 if (major_progress()) print_method(PHASE_PHASEIDEALLOOP_ITERATIONS, 2); 2254 if (failing()) return; 2255 } 2256 } 2257 // Ensure that major progress is now clear 2258 C->clear_major_progress(); 2259 2260 { 2261 // Verify that all previous optimizations produced a valid graph 2262 // at least to this point, even if no loop optimizations were done. 2263 TracePhase tp("idealLoopVerify", &timers[_t_idealLoopVerify]); 2264 PhaseIdealLoop::verify(igvn); 2265 } 2266 2267 { 2268 TracePhase tp("macroExpand", &timers[_t_macroExpand]); 2269 PhaseMacroExpand mex(igvn); 2270 if (mex.expand_macro_nodes()) { 2271 assert(failing(), "must bail out w/ explicit message"); 2272 return; 2273 } 2274 } 2275 2276 DEBUG_ONLY( _modified_nodes = NULL; ) 2277 } // (End scope of igvn; run destructor if necessary for asserts.) 2278 |