src/share/vm/c1/c1_LinearScan.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp Sdiff src/share/vm/c1

src/share/vm/c1/c1_LinearScan.cpp

Print this page




  58   static LinearScanTimers _total_timer;
  59 
  60   // helper macro for short definition of timer
  61   #define TIME_LINEAR_SCAN(timer_name)  TraceTime _block_timer("", _total_timer.timer(LinearScanTimers::timer_name), TimeLinearScan || TimeEachLinearScan, Verbose);
  62 
  63   // helper macro for short definition of trace-output inside code
  64   #define TRACE_LINEAR_SCAN(level, code)       \
  65     if (TraceLinearScanLevel >= level) {       \
  66       code;                                    \
  67     }
  68 
  69 #else
  70 
  71   #define TIME_LINEAR_SCAN(timer_name)
  72   #define TRACE_LINEAR_SCAN(level, code)
  73 
  74 #endif
  75 
  76 // Map BasicType to spill size in 32-bit words, matching VMReg's notion of words
  77 #ifdef _LP64
  78 static int type2spill_size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 0, 1, -1};
  79 #else
  80 static int type2spill_size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, -1};
  81 #endif
  82 
  83 
  84 // Implementation of LinearScan
  85 
  86 LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
  87  : _compilation(ir->compilation())
  88  , _ir(ir)
  89  , _gen(gen)
  90  , _frame_map(frame_map)
  91  , _num_virtual_regs(gen->max_virtual_register_number())
  92  , _has_fpu_registers(false)
  93  , _num_calls(-1)
  94  , _max_spills(0)
  95  , _unused_spill_slot(-1)
  96  , _intervals(0)   // initialized later with correct length
  97  , _new_intervals_from_allocation(new IntervalList())
  98  , _sorted_intervals(NULL)
  99  , _needs_full_resort(false)
 100  , _lir_ops(0)     // initialized later with correct length




  58   static LinearScanTimers _total_timer;
  59 
  60   // helper macro for short definition of timer
  61   #define TIME_LINEAR_SCAN(timer_name)  TraceTime _block_timer("", _total_timer.timer(LinearScanTimers::timer_name), TimeLinearScan || TimeEachLinearScan, Verbose);
  62 
  63   // helper macro for short definition of trace-output inside code
  64   #define TRACE_LINEAR_SCAN(level, code)       \
  65     if (TraceLinearScanLevel >= level) {       \
  66       code;                                    \
  67     }
  68 
  69 #else
  70 
  71   #define TIME_LINEAR_SCAN(timer_name)
  72   #define TRACE_LINEAR_SCAN(level, code)
  73 
  74 #endif
  75 
  76 // Map BasicType to spill size in 32-bit words, matching VMReg's notion of words
  77 #ifdef _LP64
  78 static int type2spill_size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 0, 2,  1, 2, 1, -1};
  79 #else
  80 static int type2spill_size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, -1, 1, 1, -1};
  81 #endif
  82 
  83 
  84 // Implementation of LinearScan
  85 
  86 LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
  87  : _compilation(ir->compilation())
  88  , _ir(ir)
  89  , _gen(gen)
  90  , _frame_map(frame_map)
  91  , _num_virtual_regs(gen->max_virtual_register_number())
  92  , _has_fpu_registers(false)
  93  , _num_calls(-1)
  94  , _max_spills(0)
  95  , _unused_spill_slot(-1)
  96  , _intervals(0)   // initialized later with correct length
  97  , _new_intervals_from_allocation(new IntervalList())
  98  , _sorted_intervals(NULL)
  99  , _needs_full_resort(false)
 100  , _lir_ops(0)     // initialized later with correct length


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