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