src/share/vm/opto/parseHelper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8034812 Cdiff src/share/vm/opto/parseHelper.cpp

src/share/vm/opto/parseHelper.cpp

Print this page

        

*** 41,51 **** address call_address = is_entry ? CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry) : CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit); const char *call_name = is_entry ? "dtrace_method_entry" : "dtrace_method_exit"; // Get base of thread-local storage area ! Node* thread = _gvn.transform( new (C) ThreadLocalNode() ); // Get method const TypePtr* method_type = TypeMetadataPtr::make(method); Node *method_node = _gvn.transform( ConNode::make(C, method_type) ); --- 41,51 ---- address call_address = is_entry ? CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry) : CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit); const char *call_name = is_entry ? "dtrace_method_entry" : "dtrace_method_exit"; // Get base of thread-local storage area ! Node* thread = _gvn.transform( new ThreadLocalNode() ); // Get method const TypePtr* method_type = TypeMetadataPtr::make(method); Node *method_node = _gvn.transform( ConNode::make(C, method_type) );
*** 173,184 **** // Is the array klass is exactly its defined type? if (always_see_exact_class && !tak->klass_is_exact()) { // Make a constant out of the inexact array klass const TypeKlassPtr *extak = tak->cast_to_exactness(true)->is_klassptr(); Node* con = makecon(extak); ! Node* cmp = _gvn.transform(new (C) CmpPNode( array_klass, con )); ! Node* bol = _gvn.transform(new (C) BoolNode( cmp, BoolTest::eq )); Node* ctrl= control(); { BuildCutout unless(this, bol, PROB_MAX); uncommon_trap(Deoptimization::Reason_array_check, Deoptimization::Action_maybe_recompile, tak->klass()); --- 173,184 ---- // Is the array klass is exactly its defined type? if (always_see_exact_class && !tak->klass_is_exact()) { // Make a constant out of the inexact array klass const TypeKlassPtr *extak = tak->cast_to_exactness(true)->is_klassptr(); Node* con = makecon(extak); ! Node* cmp = _gvn.transform(new CmpPNode( array_klass, con )); ! Node* bol = _gvn.transform(new BoolNode( cmp, BoolTest::eq )); Node* ctrl= control(); { BuildCutout unless(this, bol, PROB_MAX); uncommon_trap(Deoptimization::Reason_array_check, Deoptimization::Action_maybe_recompile, tak->klass());
*** 213,224 **** void Parse::emit_guard_for_new(ciInstanceKlass* klass) { // Emit guarded new // if (klass->_init_thread != current_thread || // klass->_init_state != being_initialized) // uncommon_trap ! Node* cur_thread = _gvn.transform( new (C) ThreadLocalNode() ); ! Node* merge = new (C) RegionNode(3); _gvn.set_type(merge, Type::CONTROL); Node* kls = makecon(TypeKlassPtr::make(klass)); Node* init_thread_offset = _gvn.MakeConX(in_bytes(InstanceKlass::init_thread_offset())); Node* adr_node = basic_plus_adr(kls, kls, init_thread_offset); --- 213,224 ---- void Parse::emit_guard_for_new(ciInstanceKlass* klass) { // Emit guarded new // if (klass->_init_thread != current_thread || // klass->_init_state != being_initialized) // uncommon_trap ! Node* cur_thread = _gvn.transform( new ThreadLocalNode() ); ! Node* merge = new RegionNode(3); _gvn.set_type(merge, Type::CONTROL); Node* kls = makecon(TypeKlassPtr::make(klass)); Node* init_thread_offset = _gvn.MakeConX(in_bytes(InstanceKlass::init_thread_offset())); Node* adr_node = basic_plus_adr(kls, kls, init_thread_offset);
*** 325,337 **** // This code is largely copied from the range check code in // array_addressing() // Test invocation count vs threshold Node *threshold = makecon(TypeInt::make(limit)); ! Node *chk = _gvn.transform( new (C) CmpUNode( cnt, threshold) ); BoolTest::mask btest = BoolTest::lt; ! Node *tst = _gvn.transform( new (C) BoolNode( chk, btest) ); // Branch to failure if threshold exceeded { BuildCutout unless(this, tst, PROB_ALWAYS); uncommon_trap(Deoptimization::Reason_age, Deoptimization::Action_maybe_recompile); } --- 325,337 ---- // This code is largely copied from the range check code in // array_addressing() // Test invocation count vs threshold Node *threshold = makecon(TypeInt::make(limit)); ! Node *chk = _gvn.transform( new CmpUNode( cnt, threshold) ); BoolTest::mask btest = BoolTest::lt; ! Node *tst = _gvn.transform( new BoolNode( chk, btest) ); // Branch to failure if threshold exceeded { BuildCutout unless(this, tst, PROB_ALWAYS); uncommon_trap(Deoptimization::Reason_age, Deoptimization::Action_maybe_recompile); }
*** 357,367 **** Node* cnt = make_load(ctrl, adr_iic_node, TypeInt::INT, T_INT, adr_type, MemNode::unordered); test_counter_against_threshold(cnt, limit); // Add one to the counter and store ! Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); store_to_memory(ctrl, adr_iic_node, incr, T_INT, adr_type, MemNode::unordered); } //----------------------------method_data_addressing--------------------------- Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) { --- 357,367 ---- Node* cnt = make_load(ctrl, adr_iic_node, TypeInt::INT, T_INT, adr_type, MemNode::unordered); test_counter_against_threshold(cnt, limit); // Add one to the counter and store ! Node* incr = _gvn.transform(new AddINode(cnt, _gvn.intcon(1))); store_to_memory(ctrl, adr_iic_node, incr, T_INT, adr_type, MemNode::unordered); } //----------------------------method_data_addressing--------------------------- Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) {
*** 378,389 **** Node* mdo = makecon(adr_type); Node* ptr = basic_plus_adr(mdo, mdo, offset); if (stride != 0) { Node* str = _gvn.MakeConX(stride); ! Node* scale = _gvn.transform( new (C) MulXNode( idx, str ) ); ! ptr = _gvn.transform( new (C) AddPNode( mdo, ptr, scale ) ); } return ptr; } --- 378,389 ---- Node* mdo = makecon(adr_type); Node* ptr = basic_plus_adr(mdo, mdo, offset); if (stride != 0) { Node* str = _gvn.MakeConX(stride); ! Node* scale = _gvn.transform( new MulXNode( idx, str ) ); ! ptr = _gvn.transform( new AddPNode( mdo, ptr, scale ) ); } return ptr; }
*** 391,401 **** void Parse::increment_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) { Node* adr_node = method_data_addressing(md, data, counter_offset, idx, stride); const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr(); Node* cnt = make_load(NULL, adr_node, TypeInt::INT, T_INT, adr_type, MemNode::unordered); ! Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(DataLayout::counter_increment))); store_to_memory(NULL, adr_node, incr, T_INT, adr_type, MemNode::unordered); } //--------------------------test_for_osr_md_counter_at------------------------- void Parse::test_for_osr_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, int limit) { --- 391,401 ---- void Parse::increment_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) { Node* adr_node = method_data_addressing(md, data, counter_offset, idx, stride); const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr(); Node* cnt = make_load(NULL, adr_node, TypeInt::INT, T_INT, adr_type, MemNode::unordered); ! Node* incr = _gvn.transform(new AddINode(cnt, _gvn.intcon(DataLayout::counter_increment))); store_to_memory(NULL, adr_node, incr, T_INT, adr_type, MemNode::unordered); } //--------------------------test_for_osr_md_counter_at------------------------- void Parse::test_for_osr_md_counter_at(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, int limit) {
*** 411,421 **** void Parse::set_md_flag_at(ciMethodData* md, ciProfileData* data, int flag_constant) { Node* adr_node = method_data_addressing(md, data, DataLayout::flags_offset()); const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr(); Node* flags = make_load(NULL, adr_node, TypeInt::BYTE, T_BYTE, adr_type, MemNode::unordered); ! Node* incr = _gvn.transform(new (C) OrINode(flags, _gvn.intcon(flag_constant))); store_to_memory(NULL, adr_node, incr, T_BYTE, adr_type, MemNode::unordered); } //----------------------------profile_taken_branch----------------------------- void Parse::profile_taken_branch(int target_bci, bool force_update) { --- 411,421 ---- void Parse::set_md_flag_at(ciMethodData* md, ciProfileData* data, int flag_constant) { Node* adr_node = method_data_addressing(md, data, DataLayout::flags_offset()); const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr(); Node* flags = make_load(NULL, adr_node, TypeInt::BYTE, T_BYTE, adr_type, MemNode::unordered); ! Node* incr = _gvn.transform(new OrINode(flags, _gvn.intcon(flag_constant))); store_to_memory(NULL, adr_node, incr, T_BYTE, adr_type, MemNode::unordered); } //----------------------------profile_taken_branch----------------------------- void Parse::profile_taken_branch(int target_bci, bool force_update) {
src/share/vm/opto/parseHelper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File