< prev index next >

src/hotspot/share/opto/graphKit.hpp

Print this page

        

@@ -61,10 +61,13 @@
   PhaseGVN         &_gvn;       // Some optimizations while parsing
   SafePointNode*    _map;       // Parser map from JVM to Nodes
   SafePointNode*    _exceptions;// Parser map(s) for exception state(s)
   int               _bci;       // JVM Bytecode Pointer
   ciMethod*         _method;    // JVM Current Method
+#ifdef ASSERT
+  uint              _worklist_size;
+#endif
 
  private:
   int               _sp;        // JVM Expression Stack Pointer; don't modify directly!
 
  private:

@@ -73,25 +76,30 @@
     return _map;
   }
 
  public:
   GraphKit();                   // empty constructor
-  GraphKit(JVMState* jvms);     // the JVM state on which to operate
+  GraphKit(JVMState* jvms, PhaseGVN* gvn = NULL);     // the JVM state on which to operate
 
 #ifdef ASSERT
   ~GraphKit() {
     assert(!has_exceptions(), "user must call transfer_exceptions_into_jvms");
+    // During incremental inlining, the Node_Array of the C->for_igvn() worklist and the IGVN
+    // worklist are shared but the _in_worklist VectorSet is not. To avoid inconsistencies,
+    // we should not add nodes to the _for_igvn worklist when using IGVN for the GraphKit.
+    assert((_gvn.is_IterGVN() == NULL) || (_gvn.C->for_igvn()->size() == _worklist_size),
+           "GraphKit should not modify _for_igvn worklist after parsing");
   }
 #endif
 
   virtual Parse*          is_Parse()          const { return NULL; }
   virtual LibraryCallKit* is_LibraryCallKit() const { return NULL; }
 
   ciEnv*        env()           const { return _env; }
   PhaseGVN&     gvn()           const { return _gvn; }
 
-  void record_for_igvn(Node* n) const { C->record_for_igvn(n); }  // delegate to Compile
+  void record_for_igvn(Node* n) const { _gvn.record_for_igvn(n); }
 
   // Handy well-known nodes:
   Node*         null()          const { return zerocon(T_OBJECT); }
   Node*         top()           const { return C->top(); }
   RootNode*     root()          const { return C->root(); }

@@ -878,11 +886,11 @@
   Node* get_layout_helper(Node* klass_node, jint& constant_value);
   Node* new_instance(Node* klass_node,
                      Node* slow_test = NULL,
                      Node* *return_size_val = NULL,
                      bool deoptimize_on_exception = false,
-                     ValueTypeNode* value_node = NULL);
+                     ValueTypeBaseNode* value_node = NULL);
   Node* new_array(Node* klass_node, Node* count_val, int nargs,
                   Node* *return_size_val = NULL,
                   bool deoptimize_on_exception = false);
   void initialize_value_type_array(Node* array, Node* length, ciValueKlass* vk, int nargs);
 
< prev index next >