< prev index next >

src/hotspot/share/opto/callnode.cpp

Print this page
@@ -23,10 +23,11 @@
   */
  
  #include "precompiled.hpp"
  #include "compiler/compileLog.hpp"
  #include "ci/bcEscapeAnalyzer.hpp"
+ #include "ci/ciNativeEntryPoint.hpp"
  #include "compiler/oopMap.hpp"
  #include "gc/shared/barrierSet.hpp"
  #include "gc/shared/c2/barrierSetC2.hpp"
  #include "interpreter/interpreter.hpp"
  #include "opto/callGenerator.hpp"

@@ -1081,12 +1082,14 @@
        if (in(TypeFunc::Parms)->Opcode() == Op_ConP) {
          phase->C->prepend_late_inline(cg);
          set_generator(NULL);
        }
      } else if (iid == vmIntrinsics::_linkToNative) {
-       if (in(TypeFunc::Parms + callee->arg_size() - 1)->Opcode() == Op_ConP /* NEP */
-           && in(TypeFunc::Parms + 1)->Opcode() == Op_ConL /* address */) {
+       Node* nep_node = in(TypeFunc::Parms + callee->arg_size() - 1);
+       if (nep_node->Opcode() == Op_ConP /* NEP */
+           && in(TypeFunc::Parms + 0)->Opcode() == Op_ConL /* address */
+           && !nep_node->bottom_type()->is_oopptr()->const_oop()->as_native_entry_point()->need_transition()) {
          phase->C->prepend_late_inline(cg);
          set_generator(NULL);
        }
      } else {
        assert(callee->has_member_arg(), "wrong type of call?");
< prev index next >