src/share/vm/opto/callGenerator.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7071653 Sdiff src/share/vm/opto

src/share/vm/opto/callGenerator.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  95   // be changed in meaning.
  96   //
  97   // If the call traps, the returned map must have a control edge of top.
  98   // If the call can throw, the returned map must report has_exceptions().
  99   //
 100   // If the result is NULL, it means that this CallGenerator was unable
 101   // to handle the given call, and another CallGenerator should be consulted.
 102   virtual JVMState* generate(JVMState* jvms) = 0;
 103 
 104   // How to generate a call site that is inlined:
 105   static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1);
 106   // How to generate code for an on-stack replacement handler.
 107   static CallGenerator* for_osr(ciMethod* m, int osr_bci);
 108 
 109   // How to generate vanilla out-of-line call sites:
 110   static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false);   // static, special
 111   static CallGenerator* for_dynamic_call(ciMethod* m);   // invokedynamic
 112   static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index);  // virtual, interface
 113 
 114   static CallGenerator* for_method_handle_inline(Node* method_handle, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile);

 115 
 116   // How to generate a replace a direct call with an inline version
 117   static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg);
 118 
 119   // How to make a call but defer the decision whether to inline or not.
 120   static CallGenerator* for_warm_call(WarmCallInfo* ci,
 121                                       CallGenerator* if_cold,
 122                                       CallGenerator* if_hot);
 123 
 124   // How to make a call that optimistically assumes a receiver type:
 125   static CallGenerator* for_predicted_call(ciKlass* predicted_receiver,
 126                                            CallGenerator* if_missed,
 127                                            CallGenerator* if_hit,
 128                                            float hit_prob);
 129 
 130   // How to make a call that optimistically assumes a MethodHandle target:
 131   static CallGenerator* for_predicted_dynamic_call(ciMethodHandle* predicted_method_handle,
 132                                                    CallGenerator* if_missed,
 133                                                    CallGenerator* if_hit,
 134                                                    float hit_prob);


   1 /*
   2  * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  95   // be changed in meaning.
  96   //
  97   // If the call traps, the returned map must have a control edge of top.
  98   // If the call can throw, the returned map must report has_exceptions().
  99   //
 100   // If the result is NULL, it means that this CallGenerator was unable
 101   // to handle the given call, and another CallGenerator should be consulted.
 102   virtual JVMState* generate(JVMState* jvms) = 0;
 103 
 104   // How to generate a call site that is inlined:
 105   static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1);
 106   // How to generate code for an on-stack replacement handler.
 107   static CallGenerator* for_osr(ciMethod* m, int osr_bci);
 108 
 109   // How to generate vanilla out-of-line call sites:
 110   static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false);   // static, special
 111   static CallGenerator* for_dynamic_call(ciMethod* m);   // invokedynamic
 112   static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index);  // virtual, interface
 113 
 114   static CallGenerator* for_method_handle_inline(Node* method_handle,   JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile);
 115   static CallGenerator* for_invokedynamic_inline(ciCallSite* call_site, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile);
 116 
 117   // How to generate a replace a direct call with an inline version
 118   static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg);
 119 
 120   // How to make a call but defer the decision whether to inline or not.
 121   static CallGenerator* for_warm_call(WarmCallInfo* ci,
 122                                       CallGenerator* if_cold,
 123                                       CallGenerator* if_hot);
 124 
 125   // How to make a call that optimistically assumes a receiver type:
 126   static CallGenerator* for_predicted_call(ciKlass* predicted_receiver,
 127                                            CallGenerator* if_missed,
 128                                            CallGenerator* if_hit,
 129                                            float hit_prob);
 130 
 131   // How to make a call that optimistically assumes a MethodHandle target:
 132   static CallGenerator* for_predicted_dynamic_call(ciMethodHandle* predicted_method_handle,
 133                                                    CallGenerator* if_missed,
 134                                                    CallGenerator* if_hit,
 135                                                    float hit_prob);


src/share/vm/opto/callGenerator.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File