Skip to content
Permalink
Browse files
8250877: [lworld] Remove special acmp handling for isSubstitutable0 m…
…ethod in the JIT
  • Loading branch information
TobiHartmann committed Aug 5, 2020
1 parent 448aaa0 commit f7f6929652eabfed8757c1c6930529ce994ba9cd
Showing 2 changed files with 3 additions and 10 deletions.
@@ -1279,11 +1279,7 @@ void GraphBuilder::if_node(Value x, If::Condition cond, Value y, ValueStack* sta
bool is_bb = tsux->bci() < stream()->cur_bci() || fsux->bci() < stream()->cur_bci();

bool subst_check = false;
if (EnableValhalla && (stream()->cur_bc() == Bytecodes::_if_acmpeq || stream()->cur_bc() == Bytecodes::_if_acmpne) &&
method() != ciEnv::current()->ValueBootstrapMethods_klass()->find_method(ciSymbol::isSubstitutable_name(), ciSymbol::object_object_boolean_signature())) {
// If current method is ValueBootstrapMethods::isSubstitutable(),
// compile the acmp as a regular pointer comparison otherwise we
// could call ValueBootstrapMethods::isSubstitutable() back
if (EnableValhalla && (stream()->cur_bc() == Bytecodes::_if_acmpeq || stream()->cur_bc() == Bytecodes::_if_acmpne)) {
ValueType* left_vt = x->type();
ValueType* right_vt = y->type();
if (left_vt->is_object()) {
@@ -2049,11 +2049,7 @@ void Parse::do_if(BoolTest::mask btest, Node* c, bool new_path, Node** ctrl_take
}

void Parse::do_acmp(BoolTest::mask btest, Node* a, Node* b) {
ciMethod* subst_method = ciEnv::current()->ValueBootstrapMethods_klass()->find_method(ciSymbol::isSubstitutable_name(), ciSymbol::object_object_boolean_signature());
// If current method is ValueBootstrapMethods::isSubstitutable(),
// compile the acmp as a regular pointer comparison otherwise we
// could call ValueBootstrapMethods::isSubstitutable() back
if (!EnableValhalla || (method() == subst_method)) {
if (!EnableValhalla) {
Node* cmp = CmpP(a, b);
cmp = optimize_cmp_with_klass(cmp);
do_if(btest, cmp);
@@ -2201,6 +2197,7 @@ void Parse::do_acmp(BoolTest::mask btest, Node* a, Node* b) {
set_all_memory(mem);

kill_dead_locals();
ciMethod* subst_method = ciEnv::current()->ValueBootstrapMethods_klass()->find_method(ciSymbol::isSubstitutable_name(), ciSymbol::object_object_boolean_signature());
CallStaticJavaNode *call = new CallStaticJavaNode(C, TypeFunc::make(subst_method), SharedRuntime::get_resolve_static_call_stub(), subst_method, bci());
call->set_override_symbolic_info(true);
call->init_req(TypeFunc::Parms, not_null_a);

0 comments on commit f7f6929

Please sign in to comment.