< prev index next >

src/hotspot/share/opto/vector.cpp

Print this page

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

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