< prev index next >

src/hotspot/share/opto/vector.cpp

Print this page

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

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