187 Node* use = vec_box->fast_out(i);
188 if (use->is_CallJava()) {
189 CallJavaNode* call = use->as_CallJava();
190 if (call->has_non_debug_use(vec_box) && vec_box->in(VectorBoxNode::Box)->is_Phi()) {
191 calls.push(call);
192 }
193 }
194 }
195
196 while (calls.size() > 0) {
197 CallJavaNode* call = calls.pop()->as_CallJava();
198 // Attach new VBA to the call and use it instead of Phi (VBA ... VBA).
199
200 JVMState* jvms = clone_jvms(C, call);
201 GraphKit kit(jvms);
202 PhaseGVN& gvn = kit.gvn();
203
204 // Adjust JVMS from post-call to pre-call state: put args on stack
205 uint nargs = call->method()->arg_size();
206 kit.ensure_stack(kit.sp() + nargs);
207 for (uint i = TypeFunc::Parms; i < call->tf()->domain()->cnt(); i++) {
208 kit.push(call->in(i));
209 }
210 jvms = kit.sync_jvms();
211
212 Node* new_vbox = nullptr;
213 {
214 Node* vect = vec_box->in(VectorBoxNode::Value);
215 const TypeInstPtr* vbox_type = vec_box->box_type();
216 const TypeVect* vt = vec_box->vec_type();
217 BasicType elem_bt = vt->element_basic_type();
218 int num_elem = vt->length();
219
220 new_vbox = kit.box_vector(vect, vbox_type, elem_bt, num_elem, /*deoptimize=*/true);
221
222 kit.replace_in_map(vec_box, new_vbox);
223 }
224
225 kit.dec_sp(nargs);
226 jvms = kit.sync_jvms();
227
|
187 Node* use = vec_box->fast_out(i);
188 if (use->is_CallJava()) {
189 CallJavaNode* call = use->as_CallJava();
190 if (call->has_non_debug_use(vec_box) && vec_box->in(VectorBoxNode::Box)->is_Phi()) {
191 calls.push(call);
192 }
193 }
194 }
195
196 while (calls.size() > 0) {
197 CallJavaNode* call = calls.pop()->as_CallJava();
198 // Attach new VBA to the call and use it instead of Phi (VBA ... VBA).
199
200 JVMState* jvms = clone_jvms(C, call);
201 GraphKit kit(jvms);
202 PhaseGVN& gvn = kit.gvn();
203
204 // Adjust JVMS from post-call to pre-call state: put args on stack
205 uint nargs = call->method()->arg_size();
206 kit.ensure_stack(kit.sp() + nargs);
207 for (uint i = TypeFunc::Parms; i < call->tf()->domain_sig()->cnt(); i++) {
208 kit.push(call->in(i));
209 }
210 jvms = kit.sync_jvms();
211
212 Node* new_vbox = nullptr;
213 {
214 Node* vect = vec_box->in(VectorBoxNode::Value);
215 const TypeInstPtr* vbox_type = vec_box->box_type();
216 const TypeVect* vt = vec_box->vec_type();
217 BasicType elem_bt = vt->element_basic_type();
218 int num_elem = vt->length();
219
220 new_vbox = kit.box_vector(vect, vbox_type, elem_bt, num_elem, /*deoptimize=*/true);
221
222 kit.replace_in_map(vec_box, new_vbox);
223 }
224
225 kit.dec_sp(nargs);
226 jvms = kit.sync_jvms();
227
|