src/hotspot/share/opto/compile.hpp
changeset 55307 ed12027517c0
parent 55110 17f85a8780d5
child 55583 82fae48799e4
equal deleted inserted replaced
55306:ea43db53de91 55307:ed12027517c0
    50 class Bundle;
    50 class Bundle;
    51 class C2Compiler;
    51 class C2Compiler;
    52 class CallGenerator;
    52 class CallGenerator;
    53 class CloneMap;
    53 class CloneMap;
    54 class ConnectionGraph;
    54 class ConnectionGraph;
       
    55 class IdealGraphPrinter;
    55 class InlineTree;
    56 class InlineTree;
    56 class Int_Array;
    57 class Int_Array;
    57 class LoadBarrierNode;
    58 class LoadBarrierNode;
    58 class Matcher;
    59 class Matcher;
    59 class MachConstantNode;
    60 class MachConstantNode;
    93 enum LoopOptsMode {
    94 enum LoopOptsMode {
    94   LoopOptsDefault,
    95   LoopOptsDefault,
    95   LoopOptsNone,
    96   LoopOptsNone,
    96   LoopOptsShenandoahExpand,
    97   LoopOptsShenandoahExpand,
    97   LoopOptsShenandoahPostExpand,
    98   LoopOptsShenandoahPostExpand,
       
    99   LoopOptsZBarrierInsertion,
    98   LoopOptsSkipSplitIf,
   100   LoopOptsSkipSplitIf,
    99   LoopOptsVerify,
   101   LoopOptsVerify
   100   LoopOptsLastRound
       
   101 };
   102 };
   102 
   103 
   103 typedef unsigned int node_idx_t;
   104 typedef unsigned int node_idx_t;
   104 class NodeCloneInfo {
   105 class NodeCloneInfo {
   105  private:
   106  private:
   656   void          set_inlining_incrementally(bool z) { _inlining_incrementally = z; }
   657   void          set_inlining_incrementally(bool z) { _inlining_incrementally = z; }
   657   int               inlining_incrementally() const { return _inlining_incrementally; }
   658   int               inlining_incrementally() const { return _inlining_incrementally; }
   658   void          set_do_cleanup(bool z)          { _do_cleanup = z; }
   659   void          set_do_cleanup(bool z)          { _do_cleanup = z; }
   659   int               do_cleanup() const          { return _do_cleanup; }
   660   int               do_cleanup() const          { return _do_cleanup; }
   660   void          set_major_progress()            { _major_progress++; }
   661   void          set_major_progress()            { _major_progress++; }
       
   662   void          restore_major_progress(int progress) { _major_progress += progress; }
   661   void        clear_major_progress()            { _major_progress = 0; }
   663   void        clear_major_progress()            { _major_progress = 0; }
   662   int               max_inline_size() const     { return _max_inline_size; }
   664   int               max_inline_size() const     { return _max_inline_size; }
   663   void          set_freq_inline_size(int n)     { _freq_inline_size = n; }
   665   void          set_freq_inline_size(int n)     { _freq_inline_size = n; }
   664   int               freq_inline_size() const    { return _freq_inline_size; }
   666   int               freq_inline_size() const    { return _freq_inline_size; }
   665   void          set_max_inline_size(int n)      { _max_inline_size = n; }
   667   void          set_max_inline_size(int n)      { _max_inline_size = n; }
   745     }
   747     }
   746 #endif
   748 #endif
   747     C->_latest_stage_start_counter.stamp();
   749     C->_latest_stage_start_counter.stamp();
   748   }
   750   }
   749 
   751 
   750   void print_method(CompilerPhaseType cpt, int level = 1) {
   752   bool should_print(int level = 1) {
       
   753 #ifndef PRODUCT
       
   754     return (_printer && _printer->should_print(level));
       
   755 #else
       
   756     return false;
       
   757 #endif
       
   758   }
       
   759 
       
   760   void print_method(CompilerPhaseType cpt, int level = 1, int idx = 0) {
   751     EventCompilerPhase event;
   761     EventCompilerPhase event;
   752     if (event.should_commit()) {
   762     if (event.should_commit()) {
   753       event.set_starttime(C->_latest_stage_start_counter);
   763       event.set_starttime(C->_latest_stage_start_counter);
   754       event.set_phase((u1) cpt);
   764       event.set_phase((u1) cpt);
   755       event.set_compileId(C->_compile_id);
   765       event.set_compileId(C->_compile_id);
   756       event.set_phaseLevel(level);
   766       event.set_phaseLevel(level);
   757       event.commit();
   767       event.commit();
   758     }
   768     }
   759 
   769 
   760 
       
   761 #ifndef PRODUCT
   770 #ifndef PRODUCT
   762     if (_printer && _printer->should_print(level)) {
   771     if (should_print(level)) {
   763       _printer->print_method(CompilerPhaseTypeHelper::to_string(cpt), level);
   772       char output[1024];
       
   773       if (idx != 0) {
       
   774         sprintf(output, "%s:%d", CompilerPhaseTypeHelper::to_string(cpt), idx);
       
   775       } else {
       
   776         sprintf(output, "%s", CompilerPhaseTypeHelper::to_string(cpt));
       
   777       }
       
   778       _printer->print_method(output, level);
   764     }
   779     }
   765 #endif
   780 #endif
   766     C->_latest_stage_start_counter.stamp();
   781     C->_latest_stage_start_counter.stamp();
   767   }
   782   }
   768 
   783