< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page




  56 #include "opto/memnode.hpp"
  57 #include "opto/mulnode.hpp"
  58 #include "opto/narrowptrnode.hpp"
  59 #include "opto/node.hpp"
  60 #include "opto/opcodes.hpp"
  61 #include "opto/output.hpp"
  62 #include "opto/parse.hpp"
  63 #include "opto/phaseX.hpp"
  64 #include "opto/rootnode.hpp"
  65 #include "opto/runtime.hpp"
  66 #include "opto/stringopts.hpp"
  67 #include "opto/type.hpp"
  68 #include "opto/vectornode.hpp"
  69 #include "runtime/arguments.hpp"
  70 #include "runtime/sharedRuntime.hpp"
  71 #include "runtime/signature.hpp"
  72 #include "runtime/stubRoutines.hpp"
  73 #include "runtime/timer.hpp"
  74 #include "utilities/align.hpp"
  75 #include "utilities/copy.hpp"



  76 
  77 
  78 // -------------------- Compile::mach_constant_base_node -----------------------
  79 // Constant table base node singleton.
  80 MachConstantBaseNode* Compile::mach_constant_base_node() {
  81   if (_mach_constant_base_node == NULL) {
  82     _mach_constant_base_node = new MachConstantBaseNode();
  83     _mach_constant_base_node->add_req(C->root());
  84   }
  85   return _mach_constant_base_node;
  86 }
  87 
  88 
  89 /// Support for intrinsics.
  90 
  91 // Return the index at which m must be inserted (or already exists).
  92 // The sort order is by the address of the ciMethod, with is_virtual as minor key.
  93 class IntrinsicDescPair {
  94  private:
  95   ciMethod* _m;


3735           if (!dead_nodes) {
3736             tty->print_cr("*** Dead nodes reachable via DU edges:");
3737             dead_nodes = true;
3738           }
3739           use->dump(2);
3740           tty->print_cr("---");
3741           checked.push(use);  // No repeats; pretend it is now checked.
3742         }
3743       }
3744       assert(!dead_nodes, "using nodes must be reachable from root");
3745     }
3746   }
3747 }
3748 
3749 // Verify GC barriers consistency
3750 // Currently supported:
3751 // - G1 pre-barriers (see GraphKit::g1_write_barrier_pre())
3752 void Compile::verify_barriers() {
3753   if (UseG1GC) {
3754     // Verify G1 pre-barriers
3755     const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_active());
3756 
3757     ResourceArea *area = Thread::current()->resource_area();
3758     Unique_Node_List visited(area);
3759     Node_List worklist(area);
3760     // We're going to walk control flow backwards starting from the Root
3761     worklist.push(_root);
3762     while (worklist.size() > 0) {
3763       Node* x = worklist.pop();
3764       if (x == NULL || x == top()) continue;
3765       if (visited.member(x)) {
3766         continue;
3767       } else {
3768         visited.push(x);
3769       }
3770 
3771       if (x->is_Region()) {
3772         for (uint i = 1; i < x->req(); i++) {
3773           worklist.push(x->in(i));
3774         }
3775       } else {




  56 #include "opto/memnode.hpp"
  57 #include "opto/mulnode.hpp"
  58 #include "opto/narrowptrnode.hpp"
  59 #include "opto/node.hpp"
  60 #include "opto/opcodes.hpp"
  61 #include "opto/output.hpp"
  62 #include "opto/parse.hpp"
  63 #include "opto/phaseX.hpp"
  64 #include "opto/rootnode.hpp"
  65 #include "opto/runtime.hpp"
  66 #include "opto/stringopts.hpp"
  67 #include "opto/type.hpp"
  68 #include "opto/vectornode.hpp"
  69 #include "runtime/arguments.hpp"
  70 #include "runtime/sharedRuntime.hpp"
  71 #include "runtime/signature.hpp"
  72 #include "runtime/stubRoutines.hpp"
  73 #include "runtime/timer.hpp"
  74 #include "utilities/align.hpp"
  75 #include "utilities/copy.hpp"
  76 #if INCLUDE_ALL_GCS
  77 #include "gc/g1/g1ThreadLocalData.hpp"
  78 #endif // INCLUDE_ALL_GCS
  79 
  80 
  81 // -------------------- Compile::mach_constant_base_node -----------------------
  82 // Constant table base node singleton.
  83 MachConstantBaseNode* Compile::mach_constant_base_node() {
  84   if (_mach_constant_base_node == NULL) {
  85     _mach_constant_base_node = new MachConstantBaseNode();
  86     _mach_constant_base_node->add_req(C->root());
  87   }
  88   return _mach_constant_base_node;
  89 }
  90 
  91 
  92 /// Support for intrinsics.
  93 
  94 // Return the index at which m must be inserted (or already exists).
  95 // The sort order is by the address of the ciMethod, with is_virtual as minor key.
  96 class IntrinsicDescPair {
  97  private:
  98   ciMethod* _m;


3738           if (!dead_nodes) {
3739             tty->print_cr("*** Dead nodes reachable via DU edges:");
3740             dead_nodes = true;
3741           }
3742           use->dump(2);
3743           tty->print_cr("---");
3744           checked.push(use);  // No repeats; pretend it is now checked.
3745         }
3746       }
3747       assert(!dead_nodes, "using nodes must be reachable from root");
3748     }
3749   }
3750 }
3751 
3752 // Verify GC barriers consistency
3753 // Currently supported:
3754 // - G1 pre-barriers (see GraphKit::g1_write_barrier_pre())
3755 void Compile::verify_barriers() {
3756   if (UseG1GC) {
3757     // Verify G1 pre-barriers
3758     const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
3759 
3760     ResourceArea *area = Thread::current()->resource_area();
3761     Unique_Node_List visited(area);
3762     Node_List worklist(area);
3763     // We're going to walk control flow backwards starting from the Root
3764     worklist.push(_root);
3765     while (worklist.size() > 0) {
3766       Node* x = worklist.pop();
3767       if (x == NULL || x == top()) continue;
3768       if (visited.member(x)) {
3769         continue;
3770       } else {
3771         visited.push(x);
3772       }
3773 
3774       if (x->is_Region()) {
3775         for (uint i = 1; i < x->req(); i++) {
3776           worklist.push(x->in(i));
3777         }
3778       } else {


< prev index next >