8075263: MHI::checkCustomized isn't eliminated for inlined MethodHandles
Reviewed-by: jrose, kvn
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Fri Mar 20 11:41:34 2015 -0700
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Fri Mar 20 11:41:34 2015 -0700
@@ -868,9 +868,12 @@
\
/* Custom branch frequencies profiling support for JSR292 */ \
do_class(java_lang_invoke_MethodHandleImpl, "java/lang/invoke/MethodHandleImpl") \
- do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \
- do_name( profileBoolean_name, "profileBoolean") \
- do_signature(profileBoolean_signature, "(Z[I)Z") \
+ do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \
+ do_name( profileBoolean_name, "profileBoolean") \
+ do_signature(profileBoolean_signature, "(Z[I)Z") \
+ do_intrinsic(_isCompileConstant, java_lang_invoke_MethodHandleImpl, isCompileConstant_name, isCompileConstant_signature, F_S) \
+ do_name( isCompileConstant_name, "isCompileConstant") \
+ do_alias( isCompileConstant_signature, object_boolean_signature) \
\
/* unsafe memory references (there are a lot of them...) */ \
do_signature(getObject_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \
--- a/hotspot/src/share/vm/opto/library_call.cpp Fri Mar 20 11:41:34 2015 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp Fri Mar 20 11:41:34 2015 -0700
@@ -290,6 +290,7 @@
bool inline_multiplyToLen();
bool inline_profileBoolean();
+ bool inline_isCompileConstant();
};
@@ -900,6 +901,8 @@
case vmIntrinsics::_profileBoolean:
return inline_profileBoolean();
+ case vmIntrinsics::_isCompileConstant:
+ return inline_isCompileConstant();
default:
// If you get here, it may be that someone has added a new intrinsic
@@ -5888,3 +5891,9 @@
return false;
}
}
+
+bool LibraryCallKit::inline_isCompileConstant() {
+ Node* n = argument(0);
+ set_result(n->is_Con() ? intcon(1) : intcon(0));
+ return true;
+}