comparison src/share/vm/c1/c1_LinearScan.cpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 89152779163c 0bf37f737702
children 7848fc12602b
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
2380 2380
2381 int frame_size = frame_map()->framesize(); 2381 int frame_size = frame_map()->framesize();
2382 int arg_count = frame_map()->oop_map_arg_count(); 2382 int arg_count = frame_map()->oop_map_arg_count();
2383 OopMap* map = new OopMap(frame_size, arg_count); 2383 OopMap* map = new OopMap(frame_size, arg_count);
2384 2384
2385 // Check if this is a patch site.
2386 bool is_patch_info = false;
2387 if (op->code() == lir_move) {
2388 assert(!is_call_site, "move must not be a call site");
2389 assert(op->as_Op1() != NULL, "move must be LIR_Op1");
2390 LIR_Op1* move = (LIR_Op1*)op;
2391
2392 is_patch_info = move->patch_code() != lir_patch_none;
2393 }
2394
2395 // Iterate through active intervals 2385 // Iterate through active intervals
2396 for (Interval* interval = iw->active_first(fixedKind); interval != Interval::end(); interval = interval->next()) { 2386 for (Interval* interval = iw->active_first(fixedKind); interval != Interval::end(); interval = interval->next()) {
2397 int assigned_reg = interval->assigned_reg(); 2387 int assigned_reg = interval->assigned_reg();
2398 2388
2399 assert(interval->current_from() <= op->id() && op->id() <= interval->current_to(), "interval should not be active otherwise"); 2389 assert(interval->current_from() <= op->id() && op->id() <= interval->current_to(), "interval should not be active otherwise");
2404 // start or end at the current operation are not included in the 2394 // start or end at the current operation are not included in the
2405 // oop map, except in the case of patching moves. For patching 2395 // oop map, except in the case of patching moves. For patching
2406 // moves, any intervals which end at this instruction are included 2396 // moves, any intervals which end at this instruction are included
2407 // in the oop map since we may safepoint while doing the patch 2397 // in the oop map since we may safepoint while doing the patch
2408 // before we've consumed the inputs. 2398 // before we've consumed the inputs.
2409 if (is_patch_info || op->id() < interval->current_to()) { 2399 if (op->is_patching() || op->id() < interval->current_to()) {
2410 2400
2411 // caller-save registers must not be included into oop-maps at calls 2401 // caller-save registers must not be included into oop-maps at calls
2412 assert(!is_call_site || assigned_reg >= nof_regs || !is_caller_save(assigned_reg), "interval is in a caller-save register at a call -> register will be overwritten"); 2402 assert(!is_call_site || assigned_reg >= nof_regs || !is_caller_save(assigned_reg), "interval is in a caller-save register at a call -> register will be overwritten");
2413 2403
2414 VMReg name = vm_reg_for_interval(interval); 2404 VMReg name = vm_reg_for_interval(interval);
2448 OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call()); 2438 OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call());
2449 2439
2450 for (int i = 0; i < visitor.info_count(); i++) { 2440 for (int i = 0; i < visitor.info_count(); i++) {
2451 CodeEmitInfo* info = visitor.info_at(i); 2441 CodeEmitInfo* info = visitor.info_at(i);
2452 OopMap* oop_map = first_oop_map; 2442 OopMap* oop_map = first_oop_map;
2443
2444 // compute worst case interpreter size in case of a deoptimization
2445 _compilation->update_interpreter_frame_size(info->interpreter_frame_size());
2453 2446
2454 if (info->stack()->locks_size() != first_info->stack()->locks_size()) { 2447 if (info->stack()->locks_size() != first_info->stack()->locks_size()) {
2455 // this info has a different number of locks then the precomputed oop map 2448 // this info has a different number of locks then the precomputed oop map
2456 // (possible for lock and unlock instructions) -> compute oop map with 2449 // (possible for lock and unlock instructions) -> compute oop map with
2457 // correct lock information 2450 // correct lock information