Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/macro.cpp @ 12355:cefad50507d8
Merge with hs25-b53
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 10:38:03 +0200 |
parents | 7944aba7ba41 |
children | de6a9e811145 2113136690bc |
comparison
equal
deleted
inserted
replaced
12058:ccb4f2af2319 | 12355:cefad50507d8 |
---|---|
70 uint old_dbg_start = oldcall->tf()->domain()->cnt(); | 70 uint old_dbg_start = oldcall->tf()->domain()->cnt(); |
71 uint new_dbg_start = newcall->tf()->domain()->cnt(); | 71 uint new_dbg_start = newcall->tf()->domain()->cnt(); |
72 int jvms_adj = new_dbg_start - old_dbg_start; | 72 int jvms_adj = new_dbg_start - old_dbg_start; |
73 assert (new_dbg_start == newcall->req(), "argument count mismatch"); | 73 assert (new_dbg_start == newcall->req(), "argument count mismatch"); |
74 | 74 |
75 // SafePointScalarObject node could be referenced several times in debug info. | |
76 // Use Dict to record cloned nodes. | |
75 Dict* sosn_map = new Dict(cmpkey,hashkey); | 77 Dict* sosn_map = new Dict(cmpkey,hashkey); |
76 for (uint i = old_dbg_start; i < oldcall->req(); i++) { | 78 for (uint i = old_dbg_start; i < oldcall->req(); i++) { |
77 Node* old_in = oldcall->in(i); | 79 Node* old_in = oldcall->in(i); |
78 // Clone old SafePointScalarObjectNodes, adjusting their field contents. | 80 // Clone old SafePointScalarObjectNodes, adjusting their field contents. |
79 if (old_in != NULL && old_in->is_SafePointScalarObject()) { | 81 if (old_in != NULL && old_in->is_SafePointScalarObject()) { |
80 SafePointScalarObjectNode* old_sosn = old_in->as_SafePointScalarObject(); | 82 SafePointScalarObjectNode* old_sosn = old_in->as_SafePointScalarObject(); |
81 uint old_unique = C->unique(); | 83 uint old_unique = C->unique(); |
82 Node* new_in = old_sosn->clone(jvms_adj, sosn_map); | 84 Node* new_in = old_sosn->clone(sosn_map); |
83 if (old_unique != C->unique()) { | 85 if (old_unique != C->unique()) { // New node? |
84 new_in->set_req(0, C->root()); // reset control edge | 86 new_in->set_req(0, C->root()); // reset control edge |
85 new_in = transform_later(new_in); // Register new node. | 87 new_in = transform_later(new_in); // Register new node. |
86 } | 88 } |
87 old_in = new_in; | 89 old_in = new_in; |
88 } | 90 } |
723 // Process the safepoint uses | 725 // Process the safepoint uses |
724 // | 726 // |
725 while (safepoints.length() > 0) { | 727 while (safepoints.length() > 0) { |
726 SafePointNode* sfpt = safepoints.pop(); | 728 SafePointNode* sfpt = safepoints.pop(); |
727 Node* mem = sfpt->memory(); | 729 Node* mem = sfpt->memory(); |
728 uint first_ind = sfpt->req(); | 730 assert(sfpt->jvms() != NULL, "missed JVMS"); |
731 // Fields of scalar objs are referenced only at the end | |
732 // of regular debuginfo at the last (youngest) JVMS. | |
733 // Record relative start index. | |
734 uint first_ind = (sfpt->req() - sfpt->jvms()->scloff()); | |
729 SafePointScalarObjectNode* sobj = new (C) SafePointScalarObjectNode(res_type, | 735 SafePointScalarObjectNode* sobj = new (C) SafePointScalarObjectNode(res_type, |
730 #ifdef ASSERT | 736 #ifdef ASSERT |
731 alloc, | 737 alloc, |
732 #endif | 738 #endif |
733 first_ind, nfields); | 739 first_ind, nfields); |
797 int start = jvms->debug_start(); | 803 int start = jvms->debug_start(); |
798 int end = jvms->debug_end(); | 804 int end = jvms->debug_end(); |
799 for (int i = start; i < end; i++) { | 805 for (int i = start; i < end; i++) { |
800 if (sfpt_done->in(i)->is_SafePointScalarObject()) { | 806 if (sfpt_done->in(i)->is_SafePointScalarObject()) { |
801 SafePointScalarObjectNode* scobj = sfpt_done->in(i)->as_SafePointScalarObject(); | 807 SafePointScalarObjectNode* scobj = sfpt_done->in(i)->as_SafePointScalarObject(); |
802 if (scobj->first_index() == sfpt_done->req() && | 808 if (scobj->first_index(jvms) == sfpt_done->req() && |
803 scobj->n_fields() == (uint)nfields) { | 809 scobj->n_fields() == (uint)nfields) { |
804 assert(scobj->alloc() == alloc, "sanity"); | 810 assert(scobj->alloc() == alloc, "sanity"); |
805 sfpt_done->set_req(i, res); | 811 sfpt_done->set_req(i, res); |
806 } | 812 } |
807 } | 813 } |
2183 Node* klass_node = AllocateNode::Ideal_klass(obj, &_igvn); | 2189 Node* klass_node = AllocateNode::Ideal_klass(obj, &_igvn); |
2184 if (klass_node == NULL) { | 2190 if (klass_node == NULL) { |
2185 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); | 2191 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); |
2186 klass_node = transform_later( LoadKlassNode::make(_igvn, mem, k_adr, _igvn.type(k_adr)->is_ptr()) ); | 2192 klass_node = transform_later( LoadKlassNode::make(_igvn, mem, k_adr, _igvn.type(k_adr)->is_ptr()) ); |
2187 #ifdef _LP64 | 2193 #ifdef _LP64 |
2188 if (UseCompressedKlassPointers && klass_node->is_DecodeNKlass()) { | 2194 if (UseCompressedClassPointers && klass_node->is_DecodeNKlass()) { |
2189 assert(klass_node->in(1)->Opcode() == Op_LoadNKlass, "sanity"); | 2195 assert(klass_node->in(1)->Opcode() == Op_LoadNKlass, "sanity"); |
2190 klass_node->in(1)->init_req(0, ctrl); | 2196 klass_node->in(1)->init_req(0, ctrl); |
2191 } else | 2197 } else |
2192 #endif | 2198 #endif |
2193 klass_node->init_req(0, ctrl); | 2199 klass_node->init_req(0, ctrl); |