hotspot/src/share/vm/opto/graphKit.hpp
changeset 4450 6d700b859b3e
parent 3904 007a45522a7f
child 4761 bdb7375a1fee
equal deleted inserted replaced
4448:d6ec2737186c 4450:6d700b859b3e
   277   Node* basic_plus_adr(Node* base, Node* offset) {
   277   Node* basic_plus_adr(Node* base, Node* offset) {
   278     return basic_plus_adr(base, base, offset);
   278     return basic_plus_adr(base, base, offset);
   279   }
   279   }
   280   Node* basic_plus_adr(Node* base, Node* ptr, Node* offset);
   280   Node* basic_plus_adr(Node* base, Node* ptr, Node* offset);
   281 
   281 
       
   282 
       
   283   // Some convenient shortcuts for common nodes
       
   284   Node* IfTrue(IfNode* iff)                   { return _gvn.transform(new (C,1) IfTrueNode(iff));      }
       
   285   Node* IfFalse(IfNode* iff)                  { return _gvn.transform(new (C,1) IfFalseNode(iff));     }
       
   286 
       
   287   Node* AddI(Node* l, Node* r)                { return _gvn.transform(new (C,3) AddINode(l, r));       }
       
   288   Node* SubI(Node* l, Node* r)                { return _gvn.transform(new (C,3) SubINode(l, r));       }
       
   289   Node* MulI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MulINode(l, r));       }
       
   290   Node* DivI(Node* ctl, Node* l, Node* r)     { return _gvn.transform(new (C,3) DivINode(ctl, l, r));  }
       
   291 
       
   292   Node* AndI(Node* l, Node* r)                { return _gvn.transform(new (C,3) AndINode(l, r));       }
       
   293   Node* OrI(Node* l, Node* r)                 { return _gvn.transform(new (C,3) OrINode(l, r));        }
       
   294   Node* XorI(Node* l, Node* r)                { return _gvn.transform(new (C,3) XorINode(l, r));       }
       
   295 
       
   296   Node* MaxI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MaxINode(l, r));       }
       
   297   Node* MinI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MinINode(l, r));       }
       
   298 
       
   299   Node* LShiftI(Node* l, Node* r)             { return _gvn.transform(new (C,3) LShiftINode(l, r));    }
       
   300   Node* RShiftI(Node* l, Node* r)             { return _gvn.transform(new (C,3) RShiftINode(l, r));    }
       
   301   Node* URShiftI(Node* l, Node* r)            { return _gvn.transform(new (C,3) URShiftINode(l, r));   }
       
   302 
       
   303   Node* CmpI(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpINode(l, r));       }
       
   304   Node* CmpL(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpLNode(l, r));       }
       
   305   Node* CmpP(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpPNode(l, r));       }
       
   306   Node* Bool(Node* cmp, BoolTest::mask relop) { return _gvn.transform(new (C,2) BoolNode(cmp, relop)); }
       
   307 
       
   308   Node* AddP(Node* b, Node* a, Node* o)       { return _gvn.transform(new (C,4) AddPNode(b, a, o));    }
       
   309 
   282   // Convert between int and long, and size_t.
   310   // Convert between int and long, and size_t.
   283   // (See macros ConvI2X, etc., in type.hpp for ConvI2X, etc.)
   311   // (See macros ConvI2X, etc., in type.hpp for ConvI2X, etc.)
   284   Node* ConvI2L(Node* offset);
   312   Node* ConvI2L(Node* offset);
   285   Node* ConvL2I(Node* offset);
   313   Node* ConvL2I(Node* offset);
   286   // Find out the klass of an object.
   314   // Find out the klass of an object.
   398 
   426 
   399   // Set the entire memory state; produce a new MergeMemNode.
   427   // Set the entire memory state; produce a new MergeMemNode.
   400   void set_all_memory(Node* newmem);
   428   void set_all_memory(Node* newmem);
   401 
   429 
   402   // Create a memory projection from the call, then set_all_memory.
   430   // Create a memory projection from the call, then set_all_memory.
   403   void set_all_memory_call(Node* call);
   431   void set_all_memory_call(Node* call, bool separate_io_proj = false);
   404 
   432 
   405   // Create a LoadNode, reading from the parser's memory state.
   433   // Create a LoadNode, reading from the parser's memory state.
   406   // (Note:  require_atomic_access is useful only with T_LONG.)
   434   // (Note:  require_atomic_access is useful only with T_LONG.)
   407   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
   435   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
   408                   bool require_atomic_access = false) {
   436                   bool require_atomic_access = false) {
   541 
   569 
   542   // Fill in non-argument edges for the call.
   570   // Fill in non-argument edges for the call.
   543   // Transform the call, and update the basics: control, i_o, memory.
   571   // Transform the call, and update the basics: control, i_o, memory.
   544   // (The next step is usually to call set_results_for_java_call.)
   572   // (The next step is usually to call set_results_for_java_call.)
   545   void set_edges_for_java_call(CallJavaNode* call,
   573   void set_edges_for_java_call(CallJavaNode* call,
   546                                bool must_throw = false);
   574                                bool must_throw = false, bool separate_io_proj = false);
   547 
   575 
   548   // Finish up a java call that was started by set_edges_for_java_call.
   576   // Finish up a java call that was started by set_edges_for_java_call.
   549   // Call add_exception on any throw arising from the call.
   577   // Call add_exception on any throw arising from the call.
   550   // Return the call result (transformed).
   578   // Return the call result (transformed).
   551   Node* set_results_for_java_call(CallJavaNode* call);
   579   Node* set_results_for_java_call(CallJavaNode* call, bool separate_io_proj = false);
   552 
   580 
   553   // Similar to set_edges_for_java_call, but simplified for runtime calls.
   581   // Similar to set_edges_for_java_call, but simplified for runtime calls.
   554   void  set_predefined_output_for_runtime_call(Node* call) {
   582   void  set_predefined_output_for_runtime_call(Node* call) {
   555     set_predefined_output_for_runtime_call(call, NULL, NULL);
   583     set_predefined_output_for_runtime_call(call, NULL, NULL);
   556   }
   584   }
   557   void  set_predefined_output_for_runtime_call(Node* call,
   585   void  set_predefined_output_for_runtime_call(Node* call,
   558                                                Node* keep_mem,
   586                                                Node* keep_mem,
   559                                                const TypePtr* hook_mem);
   587                                                const TypePtr* hook_mem);
   560   Node* set_predefined_input_for_runtime_call(SafePointNode* call);
   588   Node* set_predefined_input_for_runtime_call(SafePointNode* call);
       
   589 
       
   590   // Replace the call with the current state of the kit.  Requires
       
   591   // that the call was generated with separate io_projs so that
       
   592   // exceptional control flow can be handled properly.
       
   593   void replace_call(CallNode* call, Node* result);
   561 
   594 
   562   // helper functions for statistics
   595   // helper functions for statistics
   563   void increment_counter(address counter_addr);   // increment a debug counter
   596   void increment_counter(address counter_addr);   // increment a debug counter
   564   void increment_counter(Node*   counter_addr);   // increment a debug counter
   597   void increment_counter(Node*   counter_addr);   // increment a debug counter
   565 
   598