hotspot/src/share/vm/opto/compile.cpp
changeset 768 d0bebc7eefc2
parent 767 64fb1fd7186d
child 769 78e5090c7a20
equal deleted inserted replaced
767:64fb1fd7186d 768:d0bebc7eefc2
   311   Type::Initialize(compile);
   311   Type::Initialize(compile);
   312   _compile->set_scratch_buffer_blob(NULL);
   312   _compile->set_scratch_buffer_blob(NULL);
   313   _compile->begin_method();
   313   _compile->begin_method();
   314 }
   314 }
   315 CompileWrapper::~CompileWrapper() {
   315 CompileWrapper::~CompileWrapper() {
   316   if (_compile->failing()) {
       
   317     _compile->print_method("Failed");
       
   318   }
       
   319   _compile->end_method();
   316   _compile->end_method();
   320   if (_compile->scratch_buffer_blob() != NULL)
   317   if (_compile->scratch_buffer_blob() != NULL)
   321     BufferBlob::free(_compile->scratch_buffer_blob());
   318     BufferBlob::free(_compile->scratch_buffer_blob());
   322   _compile->env()->set_compiler_data(NULL);
   319   _compile->env()->set_compiler_data(NULL);
   323 }
   320 }
   601   }
   598   }
   602   // Now optimize
   599   // Now optimize
   603   Optimize();
   600   Optimize();
   604   if (failing())  return;
   601   if (failing())  return;
   605   NOT_PRODUCT( verify_graph_edges(); )
   602   NOT_PRODUCT( verify_graph_edges(); )
       
   603 
       
   604   print_method("Before Matching");
   606 
   605 
   607 #ifndef PRODUCT
   606 #ifndef PRODUCT
   608   if (PrintIdeal) {
   607   if (PrintIdeal) {
   609     ttyLocker ttyl;  // keep the following output all in one block
   608     ttyLocker ttyl;  // keep the following output all in one block
   610     // This output goes directly to the tty, not the compiler log.
   609     // This output goes directly to the tty, not the compiler log.
  1479   ResourceMark rm;
  1478   ResourceMark rm;
  1480   int          loop_opts_cnt;
  1479   int          loop_opts_cnt;
  1481 
  1480 
  1482   NOT_PRODUCT( verify_graph_edges(); )
  1481   NOT_PRODUCT( verify_graph_edges(); )
  1483 
  1482 
  1484   print_method("Start");
  1483   print_method("After Parsing");
  1485 
  1484 
  1486  {
  1485  {
  1487   // Iterative Global Value Numbering, including ideal transforms
  1486   // Iterative Global Value Numbering, including ideal transforms
  1488   // Initialize IterGVN with types and values from parse-time GVN
  1487   // Initialize IterGVN with types and values from parse-time GVN
  1489   PhaseIterGVN igvn(initial_gvn());
  1488   PhaseIterGVN igvn(initial_gvn());
  1686     TracePhase t2a("output", &_t_output, true);
  1685     TracePhase t2a("output", &_t_output, true);
  1687     NOT_PRODUCT( TraceTime t2b(NULL, &_t_codeGeneration, TimeCompiler, false); )
  1686     NOT_PRODUCT( TraceTime t2b(NULL, &_t_codeGeneration, TimeCompiler, false); )
  1688     Output();
  1687     Output();
  1689   }
  1688   }
  1690 
  1689 
  1691   print_method("End");
  1690   print_method("Final Code");
  1692 
  1691 
  1693   // He's dead, Jim.
  1692   // He's dead, Jim.
  1694   _cfg     = (PhaseCFG*)0xdeadbeef;
  1693   _cfg     = (PhaseCFG*)0xdeadbeef;
  1695   _regalloc = (PhaseChaitin*)0xdeadbeef;
  1694   _regalloc = (PhaseChaitin*)0xdeadbeef;
  1696 }
  1695 }
  2464   }
  2463   }
  2465   if (_failure_reason == NULL) {
  2464   if (_failure_reason == NULL) {
  2466     // Record the first failure reason.
  2465     // Record the first failure reason.
  2467     _failure_reason = reason;
  2466     _failure_reason = reason;
  2468   }
  2467   }
       
  2468   if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
       
  2469     C->print_method(_failure_reason);
       
  2470   }
  2469   _root = NULL;  // flush the graph, too
  2471   _root = NULL;  // flush the graph, too
  2470 }
  2472 }
  2471 
  2473 
  2472 Compile::TracePhase::TracePhase(const char* name, elapsedTimer* accumulator, bool dolog)
  2474 Compile::TracePhase::TracePhase(const char* name, elapsedTimer* accumulator, bool dolog)
  2473   : TraceTime(NULL, accumulator, false NOT_PRODUCT( || TimeCompiler ), false)
  2475   : TraceTime(NULL, accumulator, false NOT_PRODUCT( || TimeCompiler ), false)