comparison src/share/vm/opto/chaitin.cpp @ 566:91263420e1c6

6791852: assert(b->_nodes[insidx] == n,"got insidx set incorrectly") Summary: Move the CreateEx up before each round of IFG construction Reviewed-by: never, phh
author kvn
date Fri, 06 Feb 2009 13:31:03 -0800
parents 96964ebdb154
children 0fbdb4381b99 98cb887364d3
comparison
equal deleted inserted replaced
565:7fe62bb75bf4 566:91263420e1c6
226 // - we pretend there is a copy prior to each Phi in predecessor blocks. 226 // - we pretend there is a copy prior to each Phi in predecessor blocks.
227 // We will attempt to coalesce such "virtual copies" before we manifest 227 // We will attempt to coalesce such "virtual copies" before we manifest
228 // them for real. 228 // them for real.
229 de_ssa(); 229 de_ssa();
230 230
231 #ifdef ASSERT
232 // Veify the graph before RA.
233 verify(&live_arena);
234 #endif
235
231 { 236 {
232 NOT_PRODUCT( Compile::TracePhase t3("computeLive", &_t_computeLive, TimeCompiler); ) 237 NOT_PRODUCT( Compile::TracePhase t3("computeLive", &_t_computeLive, TimeCompiler); )
233 _live = NULL; // Mark live as being not available 238 _live = NULL; // Mark live as being not available
234 rm.reset_to_mark(); // Reclaim working storage 239 rm.reset_to_mark(); // Reclaim working storage
235 IndexSet::reset_memory(C, &live_arena); 240 IndexSet::reset_memory(C, &live_arena);
304 // Bail out if unique gets too large (ie - unique > MaxNodeLimit - 2*NodeLimitFudgeFactor) 309 // Bail out if unique gets too large (ie - unique > MaxNodeLimit - 2*NodeLimitFudgeFactor)
305 // or we failed to split 310 // or we failed to split
306 C->check_node_count(2*NodeLimitFudgeFactor, "out of nodes after physical split"); 311 C->check_node_count(2*NodeLimitFudgeFactor, "out of nodes after physical split");
307 if (C->failing()) return; 312 if (C->failing()) return;
308 313
309 #ifdef ASSERT
310 if( VerifyOpto || VerifyRegisterAllocator ) {
311 _cfg.verify();
312 verify_base_ptrs(&live_arena);
313 }
314 #endif
315 NOT_PRODUCT( C->verify_graph_edges(); ) 314 NOT_PRODUCT( C->verify_graph_edges(); )
316 315
317 compact(); // Compact LRGs; return new lower max lrg 316 compact(); // Compact LRGs; return new lower max lrg
318 317
319 { 318 {
338 coalesce.coalesce_driver( ); 337 coalesce.coalesce_driver( );
339 } 338 }
340 compress_uf_map_for_nodes(); 339 compress_uf_map_for_nodes();
341 340
342 #ifdef ASSERT 341 #ifdef ASSERT
343 if( VerifyOpto || VerifyRegisterAllocator ) _ifg->verify(this); 342 verify(&live_arena, true);
344 #endif 343 #endif
345 } else { 344 } else {
346 ifg.SquareUp(); 345 ifg.SquareUp();
347 ifg.Compute_Effective_Degree(); 346 ifg.Compute_Effective_Degree();
348 #ifdef ASSERT 347 #ifdef ASSERT
374 if( !_maxlrg ) return; 373 if( !_maxlrg ) return;
375 _maxlrg = Split( _maxlrg ); // Split spilling LRG everywhere 374 _maxlrg = Split( _maxlrg ); // Split spilling LRG everywhere
376 // Bail out if unique gets too large (ie - unique > MaxNodeLimit - 2*NodeLimitFudgeFactor) 375 // Bail out if unique gets too large (ie - unique > MaxNodeLimit - 2*NodeLimitFudgeFactor)
377 C->check_node_count(2*NodeLimitFudgeFactor, "out of nodes after split"); 376 C->check_node_count(2*NodeLimitFudgeFactor, "out of nodes after split");
378 if (C->failing()) return; 377 if (C->failing()) return;
379 #ifdef ASSERT
380 if( VerifyOpto || VerifyRegisterAllocator ) {
381 _cfg.verify();
382 verify_base_ptrs(&live_arena);
383 }
384 #endif
385 378
386 compact(); // Compact LRGs; return new lower max lrg 379 compact(); // Compact LRGs; return new lower max lrg
387 380
388 // Nuke the live-ness and interference graph and LiveRanGe info 381 // Nuke the live-ness and interference graph and LiveRanGe info
389 { 382 {
410 // Check for few live ranges determines how aggressive coalesce is. 403 // Check for few live ranges determines how aggressive coalesce is.
411 coalesce.coalesce_driver( ); 404 coalesce.coalesce_driver( );
412 } 405 }
413 compress_uf_map_for_nodes(); 406 compress_uf_map_for_nodes();
414 #ifdef ASSERT 407 #ifdef ASSERT
415 if( VerifyOpto || VerifyRegisterAllocator ) _ifg->verify(this); 408 verify(&live_arena, true);
416 #endif 409 #endif
417 cache_lrg_info(); // Count degree of LRGs 410 cache_lrg_info(); // Count degree of LRGs
418 411
419 // Simplify the InterFerence Graph by removing LRGs of low degree. 412 // Simplify the InterFerence Graph by removing LRGs of low degree.
420 // LRGs of low degree are trivially colorable. 413 // LRGs of low degree are trivially colorable.
429 _allocator_attempts += _trip_cnt + 1; 422 _allocator_attempts += _trip_cnt + 1;
430 _allocator_successes += 1; 423 _allocator_successes += 1;
431 424
432 // Peephole remove copies 425 // Peephole remove copies
433 post_allocate_copy_removal(); 426 post_allocate_copy_removal();
427
428 #ifdef ASSERT
429 // Veify the graph after RA.
430 verify(&live_arena);
431 #endif
434 432
435 // max_reg is past the largest *register* used. 433 // max_reg is past the largest *register* used.
436 // Convert that to a frame_slot number. 434 // Convert that to a frame_slot number.
437 if( _max_reg <= _matcher._new_SP ) 435 if( _max_reg <= _matcher._new_SP )
438 _framesize = C->out_preserve_stack_slots(); 436 _framesize = C->out_preserve_stack_slots();