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

src/share/vm/opto/compile.cpp

Print this page




  50 #include "opto/macro.hpp"
  51 #include "opto/matcher.hpp"
  52 #include "opto/mathexactnode.hpp"
  53 #include "opto/memnode.hpp"
  54 #include "opto/mulnode.hpp"
  55 #include "opto/narrowptrnode.hpp"
  56 #include "opto/node.hpp"
  57 #include "opto/opcodes.hpp"
  58 #include "opto/output.hpp"
  59 #include "opto/parse.hpp"
  60 #include "opto/phaseX.hpp"
  61 #include "opto/rootnode.hpp"
  62 #include "opto/runtime.hpp"
  63 #include "opto/stringopts.hpp"
  64 #include "opto/type.hpp"
  65 #include "opto/vectornode.hpp"
  66 #include "runtime/arguments.hpp"
  67 #include "runtime/signature.hpp"
  68 #include "runtime/stubRoutines.hpp"
  69 #include "runtime/timer.hpp"
  70 #include "trace/tracing.hpp"
  71 #include "utilities/copy.hpp"
  72 
  73 
  74 // -------------------- Compile::mach_constant_base_node -----------------------
  75 // Constant table base node singleton.
  76 MachConstantBaseNode* Compile::mach_constant_base_node() {
  77   if (_mach_constant_base_node == NULL) {
  78     _mach_constant_base_node = new MachConstantBaseNode();
  79     _mach_constant_base_node->add_req(C->root());
  80   }
  81   return _mach_constant_base_node;
  82 }
  83 
  84 
  85 /// Support for intrinsics.
  86 
  87 // Return the index at which m must be inserted (or already exists).
  88 // The sort order is by the address of the ciMethod, with is_virtual as minor key.
  89 int Compile::intrinsic_insertion_index(ciMethod* m, bool is_virtual) {
  90 #ifdef ASSERT


3523     }
3524   }
3525 }
3526 
3527 #endif
3528 
3529 // The Compile object keeps track of failure reasons separately from the ciEnv.
3530 // This is required because there is not quite a 1-1 relation between the
3531 // ciEnv and its compilation task and the Compile object.  Note that one
3532 // ciEnv might use two Compile objects, if C2Compiler::compile_method decides
3533 // to backtrack and retry without subsuming loads.  Other than this backtracking
3534 // behavior, the Compile's failure reason is quietly copied up to the ciEnv
3535 // by the logic in C2Compiler.
3536 void Compile::record_failure(const char* reason) {
3537   if (log() != NULL) {
3538     log()->elem("failure reason='%s' phase='compile'", reason);
3539   }
3540   if (_failure_reason == NULL) {
3541     // Record the first failure reason.
3542     _failure_reason = reason;
3543   }
3544 
3545   EventCompilerFailure event;
3546   if (event.should_commit()) {
3547     event.set_compileID(Compile::compile_id());
3548     event.set_failure(reason);
3549     event.commit();
3550   }
3551 
3552   if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
3553     C->print_method(PHASE_FAILURE);
3554   }
3555   _root = NULL;  // flush the graph, too
3556 }
3557 
3558 Compile::TracePhase::TracePhase(const char* name, elapsedTimer* accumulator)
3559   : TraceTime(name, accumulator, CITime, CITimeVerbose),
3560     _phase_name(name), _dolog(CITimeVerbose)
3561 {
3562   if (_dolog) {
3563     C = Compile::current();
3564     _log = C->log();
3565   } else {
3566     C = NULL;
3567     _log = NULL;
3568   }
3569   if (_log != NULL) {




  50 #include "opto/macro.hpp"
  51 #include "opto/matcher.hpp"
  52 #include "opto/mathexactnode.hpp"
  53 #include "opto/memnode.hpp"
  54 #include "opto/mulnode.hpp"
  55 #include "opto/narrowptrnode.hpp"
  56 #include "opto/node.hpp"
  57 #include "opto/opcodes.hpp"
  58 #include "opto/output.hpp"
  59 #include "opto/parse.hpp"
  60 #include "opto/phaseX.hpp"
  61 #include "opto/rootnode.hpp"
  62 #include "opto/runtime.hpp"
  63 #include "opto/stringopts.hpp"
  64 #include "opto/type.hpp"
  65 #include "opto/vectornode.hpp"
  66 #include "runtime/arguments.hpp"
  67 #include "runtime/signature.hpp"
  68 #include "runtime/stubRoutines.hpp"
  69 #include "runtime/timer.hpp"

  70 #include "utilities/copy.hpp"
  71 
  72 
  73 // -------------------- Compile::mach_constant_base_node -----------------------
  74 // Constant table base node singleton.
  75 MachConstantBaseNode* Compile::mach_constant_base_node() {
  76   if (_mach_constant_base_node == NULL) {
  77     _mach_constant_base_node = new MachConstantBaseNode();
  78     _mach_constant_base_node->add_req(C->root());
  79   }
  80   return _mach_constant_base_node;
  81 }
  82 
  83 
  84 /// Support for intrinsics.
  85 
  86 // Return the index at which m must be inserted (or already exists).
  87 // The sort order is by the address of the ciMethod, with is_virtual as minor key.
  88 int Compile::intrinsic_insertion_index(ciMethod* m, bool is_virtual) {
  89 #ifdef ASSERT


3522     }
3523   }
3524 }
3525 
3526 #endif
3527 
3528 // The Compile object keeps track of failure reasons separately from the ciEnv.
3529 // This is required because there is not quite a 1-1 relation between the
3530 // ciEnv and its compilation task and the Compile object.  Note that one
3531 // ciEnv might use two Compile objects, if C2Compiler::compile_method decides
3532 // to backtrack and retry without subsuming loads.  Other than this backtracking
3533 // behavior, the Compile's failure reason is quietly copied up to the ciEnv
3534 // by the logic in C2Compiler.
3535 void Compile::record_failure(const char* reason) {
3536   if (log() != NULL) {
3537     log()->elem("failure reason='%s' phase='compile'", reason);
3538   }
3539   if (_failure_reason == NULL) {
3540     // Record the first failure reason.
3541     _failure_reason = reason;







3542   }
3543 
3544   if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
3545     C->print_method(PHASE_FAILURE);
3546   }
3547   _root = NULL;  // flush the graph, too
3548 }
3549 
3550 Compile::TracePhase::TracePhase(const char* name, elapsedTimer* accumulator)
3551   : TraceTime(name, accumulator, CITime, CITimeVerbose),
3552     _phase_name(name), _dolog(CITimeVerbose)
3553 {
3554   if (_dolog) {
3555     C = Compile::current();
3556     _log = C->log();
3557   } else {
3558     C = NULL;
3559     _log = NULL;
3560   }
3561   if (_log != NULL) {


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