2434 for (int i = 0; i < locks_count; i++) {
2435 set_oop(map, frame_map()->monitor_object_regname(i));
2436 }
2437
2438 return map;
2439 }
2440
2441
2442 void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &visitor, LIR_Op* op) {
2443 assert(visitor.info_count() > 0, "no oop map needed");
2444
2445 // compute oop_map only for first CodeEmitInfo
2446 // because it is (in most cases) equal for all other infos of the same operation
2447 CodeEmitInfo* first_info = visitor.info_at(0);
2448 OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call());
2449
2450 for (int i = 0; i < visitor.info_count(); i++) {
2451 CodeEmitInfo* info = visitor.info_at(i);
2452 OopMap* oop_map = first_oop_map;
2453
2454 if (info->stack()->locks_size() != first_info->stack()->locks_size()) {
2455 // this info has a different number of locks then the precomputed oop map
2456 // (possible for lock and unlock instructions) -> compute oop map with
2457 // correct lock information
2458 oop_map = compute_oop_map(iw, op, info, visitor.has_call());
2459 }
2460
2461 if (info->_oop_map == NULL) {
2462 info->_oop_map = oop_map;
2463 } else {
2464 // a CodeEmitInfo can not be shared between different LIR-instructions
2465 // because interval splitting can occur anywhere between two instructions
2466 // and so the oop maps must be different
2467 // -> check if the already set oop_map is exactly the one calculated for this operation
2468 assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2469 }
2470 }
2471 }
2472
2473
|
2434 for (int i = 0; i < locks_count; i++) {
2435 set_oop(map, frame_map()->monitor_object_regname(i));
2436 }
2437
2438 return map;
2439 }
2440
2441
2442 void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &visitor, LIR_Op* op) {
2443 assert(visitor.info_count() > 0, "no oop map needed");
2444
2445 // compute oop_map only for first CodeEmitInfo
2446 // because it is (in most cases) equal for all other infos of the same operation
2447 CodeEmitInfo* first_info = visitor.info_at(0);
2448 OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call());
2449
2450 for (int i = 0; i < visitor.info_count(); i++) {
2451 CodeEmitInfo* info = visitor.info_at(i);
2452 OopMap* oop_map = first_oop_map;
2453
2454 // compute worst case interpreter size in case of a deoptimization
2455 _compilation->update_interpreter_frame_size(info->interpreter_frame_size());
2456
2457 if (info->stack()->locks_size() != first_info->stack()->locks_size()) {
2458 // this info has a different number of locks then the precomputed oop map
2459 // (possible for lock and unlock instructions) -> compute oop map with
2460 // correct lock information
2461 oop_map = compute_oop_map(iw, op, info, visitor.has_call());
2462 }
2463
2464 if (info->_oop_map == NULL) {
2465 info->_oop_map = oop_map;
2466 } else {
2467 // a CodeEmitInfo can not be shared between different LIR-instructions
2468 // because interval splitting can occur anywhere between two instructions
2469 // and so the oop maps must be different
2470 // -> check if the already set oop_map is exactly the one calculated for this operation
2471 assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2472 }
2473 }
2474 }
2475
2476
|