src/share/vm/opto/reg_split.cpp

Print this page




 451       }
 452     }
 453     if (n->out_RegMask().is_NotEmpty()) {
 454       return false;
 455     }
 456   }
 457   return false;
 458 }
 459 
 460 //------------------------------Split--------------------------------------
 461 //----------Split Routine----------
 462 // ***** NEW SPLITTING HEURISTIC *****
 463 // DEFS: If the DEF is in a High Register Pressure(HRP) Block, split there.
 464 //        Else, no split unless there is a HRP block between a DEF and
 465 //        one of its uses, and then split at the HRP block.
 466 //
 467 // USES: If USE is in HRP, split at use to leave main LRG on stack.
 468 //       Else, hoist LRG back up to register only (ie - split is also DEF)
 469 // We will compute a new maxlrg as we go
 470 uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
 471   NOT_PRODUCT( Compile::TracePhase t3("regAllocSplit", &_t_regAllocSplit, TimeCompiler); )
 472 
 473   // Free thread local resources used by this method on exit.
 474   ResourceMark rm(split_arena);
 475 
 476   uint                 bidx, pidx, slidx, insidx, inpidx, twoidx;
 477   uint                 non_phi = 1, spill_cnt = 0;
 478   Node                *n1, *n2, *n3;
 479   Node_List           *defs,*phis;
 480   bool                *UPblock;
 481   bool                 u1, u2, u3;
 482   Block               *b, *pred;
 483   PhiNode             *phi;
 484   GrowableArray<uint>  lidxs(split_arena, maxlrg, 0, 0);
 485 
 486   // Array of counters to count splits per live range
 487   GrowableArray<uint>  splits(split_arena, maxlrg, 0, 0);
 488 
 489 #define NEW_SPLIT_ARRAY(type, size)\
 490   (type*) split_arena->allocate_bytes((size) * sizeof(type))
 491 




 451       }
 452     }
 453     if (n->out_RegMask().is_NotEmpty()) {
 454       return false;
 455     }
 456   }
 457   return false;
 458 }
 459 
 460 //------------------------------Split--------------------------------------
 461 //----------Split Routine----------
 462 // ***** NEW SPLITTING HEURISTIC *****
 463 // DEFS: If the DEF is in a High Register Pressure(HRP) Block, split there.
 464 //        Else, no split unless there is a HRP block between a DEF and
 465 //        one of its uses, and then split at the HRP block.
 466 //
 467 // USES: If USE is in HRP, split at use to leave main LRG on stack.
 468 //       Else, hoist LRG back up to register only (ie - split is also DEF)
 469 // We will compute a new maxlrg as we go
 470 uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
 471   Compile::TracePhase t3("regAllocSplit", &timers[_t_regAllocSplit]);
 472 
 473   // Free thread local resources used by this method on exit.
 474   ResourceMark rm(split_arena);
 475 
 476   uint                 bidx, pidx, slidx, insidx, inpidx, twoidx;
 477   uint                 non_phi = 1, spill_cnt = 0;
 478   Node                *n1, *n2, *n3;
 479   Node_List           *defs,*phis;
 480   bool                *UPblock;
 481   bool                 u1, u2, u3;
 482   Block               *b, *pred;
 483   PhiNode             *phi;
 484   GrowableArray<uint>  lidxs(split_arena, maxlrg, 0, 0);
 485 
 486   // Array of counters to count splits per live range
 487   GrowableArray<uint>  splits(split_arena, maxlrg, 0, 0);
 488 
 489 #define NEW_SPLIT_ARRAY(type, size)\
 490   (type*) split_arena->allocate_bytes((size) * sizeof(type))
 491