8075263: MHI::checkCustomized isn't eliminated for inlined MethodHandles

Reviewed-by: jrose, kvn
This commit is contained in:
Vladimir Ivanov 2015-03-20 11:41:34 -07:00
parent ad99060af9
commit 43dbb43fb5
2 changed files with 15 additions and 3 deletions

View file

@ -868,9 +868,12 @@
\ \
/* Custom branch frequencies profiling support for JSR292 */ \ /* Custom branch frequencies profiling support for JSR292 */ \
do_class(java_lang_invoke_MethodHandleImpl, "java/lang/invoke/MethodHandleImpl") \ do_class(java_lang_invoke_MethodHandleImpl, "java/lang/invoke/MethodHandleImpl") \
do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \ do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \
do_name( profileBoolean_name, "profileBoolean") \ do_name( profileBoolean_name, "profileBoolean") \
do_signature(profileBoolean_signature, "(Z[I)Z") \ 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...) */ \ /* unsafe memory references (there are a lot of them...) */ \
do_signature(getObject_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \ do_signature(getObject_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \

View file

@ -290,6 +290,7 @@ class LibraryCallKit : public GraphKit {
bool inline_multiplyToLen(); bool inline_multiplyToLen();
bool inline_profileBoolean(); bool inline_profileBoolean();
bool inline_isCompileConstant();
}; };
@ -900,6 +901,8 @@ bool LibraryCallKit::try_to_inline(int predicate) {
case vmIntrinsics::_profileBoolean: case vmIntrinsics::_profileBoolean:
return inline_profileBoolean(); return inline_profileBoolean();
case vmIntrinsics::_isCompileConstant:
return inline_isCompileConstant();
default: default:
// If you get here, it may be that someone has added a new intrinsic // If you get here, it may be that someone has added a new intrinsic
@ -5888,3 +5891,9 @@ bool LibraryCallKit::inline_profileBoolean() {
return false; return false;
} }
} }
bool LibraryCallKit::inline_isCompileConstant() {
Node* n = argument(0);
set_result(n->is_Con() ? intcon(1) : intcon(0));
return true;
}