comparison src/share/vm/opto/callGenerator.cpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 89152779163c dda2ae6f9557
children 7848fc12602b
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
199 // be converted to an implicit check based on profile information. 199 // be converted to an implicit check based on profile information.
200 // However currently the conversion to implicit null checks in 200 // However currently the conversion to implicit null checks in
201 // Block::implicit_null_check() only looks for loads and stores, not calls. 201 // Block::implicit_null_check() only looks for loads and stores, not calls.
202 ciMethod *caller = kit.method(); 202 ciMethod *caller = kit.method();
203 ciMethodData *caller_md = (caller == NULL) ? NULL : caller->method_data(); 203 ciMethodData *caller_md = (caller == NULL) ? NULL : caller->method_data();
204 if (!UseInlineCaches || !ImplicitNullChecks || 204 if (!UseInlineCaches || !ImplicitNullChecks || !os::zero_page_read_protected() ||
205 ((ImplicitNullCheckThreshold > 0) && caller_md && 205 ((ImplicitNullCheckThreshold > 0) && caller_md &&
206 (caller_md->trap_count(Deoptimization::Reason_null_check) 206 (caller_md->trap_count(Deoptimization::Reason_null_check)
207 >= (uint)ImplicitNullCheckThreshold))) { 207 >= (uint)ImplicitNullCheckThreshold))) {
208 // Make an explicit receiver null_check as part of this call. 208 // Make an explicit receiver null_check as part of this call.
209 // Since we share a map with the caller, his JVMS gets adjusted. 209 // Since we share a map with the caller, his JVMS gets adjusted.
379 } 379 }
380 log->tail("late_inline"); 380 log->tail("late_inline");
381 } 381 }
382 382
383 // Setup default node notes to be picked up by the inlining 383 // Setup default node notes to be picked up by the inlining
384 Node_Notes* old_nn = C->default_node_notes(); 384 Node_Notes* old_nn = C->node_notes_at(call->_idx);
385 if (old_nn != NULL) { 385 if (old_nn != NULL) {
386 Node_Notes* entry_nn = old_nn->clone(C); 386 Node_Notes* entry_nn = old_nn->clone(C);
387 entry_nn->set_jvms(jvms); 387 entry_nn->set_jvms(jvms);
388 C->set_default_node_notes(entry_nn); 388 C->set_default_node_notes(entry_nn);
389 } 389 }
720 if( i >= limit ) break; 720 if( i >= limit ) break;
721 } 721 }
722 Node* m = kit.map()->in(i); 722 Node* m = kit.map()->in(i);
723 Node* n = slow_map->in(i); 723 Node* n = slow_map->in(i);
724 if (m != n) { 724 if (m != n) {
725 const Type* t = gvn.type(m)->meet(gvn.type(n)); 725 const Type* t = gvn.type(m)->meet_speculative(gvn.type(n));
726 Node* phi = PhiNode::make(region, m, t); 726 Node* phi = PhiNode::make(region, m, t);
727 phi->set_req(2, n); 727 phi->set_req(2, n);
728 kit.map()->set_req(i, gvn.transform(phi)); 728 kit.map()->set_req(i, gvn.transform(phi));
729 } 729 }
730 } 730 }
835 if (is_virtual_or_interface) { 835 if (is_virtual_or_interface) {
836 ciInstanceKlass* klass = target->holder(); 836 ciInstanceKlass* klass = target->holder();
837 Node* receiver_node = kit.argument(0); 837 Node* receiver_node = kit.argument(0);
838 const TypeOopPtr* receiver_type = gvn.type(receiver_node)->isa_oopptr(); 838 const TypeOopPtr* receiver_type = gvn.type(receiver_node)->isa_oopptr();
839 // call_does_dispatch and vtable_index are out-parameters. They might be changed. 839 // call_does_dispatch and vtable_index are out-parameters. They might be changed.
840 target = C->optimize_virtual_call(caller, jvms->bci(), klass, target, receiver_type, 840 // optimize_virtual_call() takes 2 different holder
841 is_virtual, 841 // arguments for a corner case that doesn't apply here (see
842 // Parse::do_call())
843 target = C->optimize_virtual_call(caller, jvms->bci(), klass, klass,
844 target, receiver_type, is_virtual,
842 call_does_dispatch, vtable_index); // out-parameters 845 call_does_dispatch, vtable_index); // out-parameters
843 // We lack profiling at this call but type speculation may 846 // We lack profiling at this call but type speculation may
844 // provide us with a type 847 // provide us with a type
845 speculative_receiver_type = receiver_type->speculative_type(); 848 speculative_receiver_type = receiver_type->speculative_type();
846 } 849 }
973 if( i >= limit ) break; 976 if( i >= limit ) break;
974 } 977 }
975 Node* m = kit.map()->in(i); 978 Node* m = kit.map()->in(i);
976 Node* n = slow_map->in(i); 979 Node* n = slow_map->in(i);
977 if (m != n) { 980 if (m != n) {
978 const Type* t = gvn.type(m)->meet(gvn.type(n)); 981 const Type* t = gvn.type(m)->meet_speculative(gvn.type(n));
979 Node* phi = PhiNode::make(region, m, t); 982 Node* phi = PhiNode::make(region, m, t);
980 phi->set_req(2, n); 983 phi->set_req(2, n);
981 kit.map()->set_req(i, gvn.transform(phi)); 984 kit.map()->set_req(i, gvn.transform(phi));
982 } 985 }
983 } 986 }