src/share/vm/opto/chaitin.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/chaitin.cpp

Print this page
rev 8995 : 8046155: JEP165: Compiler Control
Summary:
Reviewed-by:


 194 PhaseChaitin::PhaseChaitin(uint unique, PhaseCFG &cfg, Matcher &matcher, bool scheduling_info_generated)
 195   : PhaseRegAlloc(unique, cfg, matcher,
 196 #ifndef PRODUCT
 197        print_chaitin_statistics
 198 #else
 199        NULL
 200 #endif
 201        )
 202   , _lrg_map(Thread::current()->resource_area(), unique)
 203   , _live(0)
 204   , _spilled_once(Thread::current()->resource_area())
 205   , _spilled_twice(Thread::current()->resource_area())
 206   , _lo_degree(0), _lo_stk_degree(0), _hi_degree(0), _simplified(0)
 207   , _oldphi(unique)
 208   , _scheduling_info_generated(scheduling_info_generated)
 209   , _sched_int_pressure(0, INTPRESSURE)
 210   , _sched_float_pressure(0, FLOATPRESSURE)
 211   , _scratch_int_pressure(0, INTPRESSURE)
 212   , _scratch_float_pressure(0, FLOATPRESSURE)
 213 #ifndef PRODUCT
 214   , _trace_spilling(TraceSpilling || C->method_has_option("TraceSpilling"))
 215 #endif
 216 {
 217   Compile::TracePhase tp("ctorChaitin", &timers[_t_ctorChaitin]);
 218 
 219   _high_frequency_lrg = MIN2(double(OPTO_LRG_HIGH_FREQ), _cfg.get_outer_loop_frequency());
 220 
 221   // Build a list of basic blocks, sorted by frequency
 222   _blks = NEW_RESOURCE_ARRAY(Block *, _cfg.number_of_blocks());
 223   // Experiment with sorting strategies to speed compilation
 224   double  cutoff = BLOCK_FREQUENCY(1.0); // Cutoff for high frequency bucket
 225   Block **buckets[NUMBUCKS];             // Array of buckets
 226   uint    buckcnt[NUMBUCKS];             // Array of bucket counters
 227   double  buckval[NUMBUCKS];             // Array of bucket value cutoffs
 228   for (uint i = 0; i < NUMBUCKS; i++) {
 229     buckets[i] = NEW_RESOURCE_ARRAY(Block *, _cfg.number_of_blocks());
 230     buckcnt[i] = 0;
 231     // Bump by three orders of magnitude each time
 232     cutoff *= 0.001;
 233     buckval[i] = cutoff;
 234     for (uint j = 0; j < _cfg.number_of_blocks(); j++) {




 194 PhaseChaitin::PhaseChaitin(uint unique, PhaseCFG &cfg, Matcher &matcher, bool scheduling_info_generated)
 195   : PhaseRegAlloc(unique, cfg, matcher,
 196 #ifndef PRODUCT
 197        print_chaitin_statistics
 198 #else
 199        NULL
 200 #endif
 201        )
 202   , _lrg_map(Thread::current()->resource_area(), unique)
 203   , _live(0)
 204   , _spilled_once(Thread::current()->resource_area())
 205   , _spilled_twice(Thread::current()->resource_area())
 206   , _lo_degree(0), _lo_stk_degree(0), _hi_degree(0), _simplified(0)
 207   , _oldphi(unique)
 208   , _scheduling_info_generated(scheduling_info_generated)
 209   , _sched_int_pressure(0, INTPRESSURE)
 210   , _sched_float_pressure(0, FLOATPRESSURE)
 211   , _scratch_int_pressure(0, INTPRESSURE)
 212   , _scratch_float_pressure(0, FLOATPRESSURE)
 213 #ifndef PRODUCT
 214   , _trace_spilling(C->env()->dirset()->TraceSpillingOption)
 215 #endif
 216 {
 217   Compile::TracePhase tp("ctorChaitin", &timers[_t_ctorChaitin]);
 218 
 219   _high_frequency_lrg = MIN2(double(OPTO_LRG_HIGH_FREQ), _cfg.get_outer_loop_frequency());
 220 
 221   // Build a list of basic blocks, sorted by frequency
 222   _blks = NEW_RESOURCE_ARRAY(Block *, _cfg.number_of_blocks());
 223   // Experiment with sorting strategies to speed compilation
 224   double  cutoff = BLOCK_FREQUENCY(1.0); // Cutoff for high frequency bucket
 225   Block **buckets[NUMBUCKS];             // Array of buckets
 226   uint    buckcnt[NUMBUCKS];             // Array of bucket counters
 227   double  buckval[NUMBUCKS];             // Array of bucket value cutoffs
 228   for (uint i = 0; i < NUMBUCKS; i++) {
 229     buckets[i] = NEW_RESOURCE_ARRAY(Block *, _cfg.number_of_blocks());
 230     buckcnt[i] = 0;
 231     // Bump by three orders of magnitude each time
 232     cutoff *= 0.001;
 233     buckval[i] = cutoff;
 234     for (uint j = 0; j < _cfg.number_of_blocks(); j++) {


src/share/vm/opto/chaitin.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File