comparison src/share/vm/opto/graphKit.cpp @ 2444:07acc51c1d2a

7032314: Allow to generate CallLeafNoFPNode in IdealKit Summary: Added CallLeafNoFPNode generation to IdealKit. Added i_o synchronization. Reviewed-by: never
author kvn
date Sat, 02 Apr 2011 09:49:27 -0700
parents 9dc311b8473e
children 6c97c830fb6f
comparison
equal deleted inserted replaced
2443:f8b038506985 2444:07acc51c1d2a
3383 3383
3384 //----------------------------- store barriers ---------------------------- 3384 //----------------------------- store barriers ----------------------------
3385 #define __ ideal. 3385 #define __ ideal.
3386 3386
3387 void GraphKit::sync_kit(IdealKit& ideal) { 3387 void GraphKit::sync_kit(IdealKit& ideal) {
3388 set_all_memory(__ merged_memory());
3389 set_i_o(__ i_o());
3390 set_control(__ ctrl());
3391 }
3392
3393 void GraphKit::final_sync(IdealKit& ideal) {
3388 // Final sync IdealKit and graphKit. 3394 // Final sync IdealKit and graphKit.
3389 __ drain_delay_transform(); 3395 __ drain_delay_transform();
3390 set_all_memory(__ merged_memory()); 3396 sync_kit(ideal);
3391 set_control(__ ctrl());
3392 } 3397 }
3393 3398
3394 // vanilla/CMS post barrier 3399 // vanilla/CMS post barrier
3395 // Insert a write-barrier store. This is to let generational GC work; we have 3400 // Insert a write-barrier store. This is to let generational GC work; we have
3396 // to flag all oop-stores before the next GC point. 3401 // to flag all oop-stores before the next GC point.
3433 adr = obj; 3438 adr = obj;
3434 } 3439 }
3435 // (Else it's an array (or unknown), and we want more precise card marks.) 3440 // (Else it's an array (or unknown), and we want more precise card marks.)
3436 assert(adr != NULL, ""); 3441 assert(adr != NULL, "");
3437 3442
3438 IdealKit ideal(gvn(), control(), merged_memory(), true); 3443 IdealKit ideal(this, true);
3439 3444
3440 // Convert the pointer to an int prior to doing math on it 3445 // Convert the pointer to an int prior to doing math on it
3441 Node* cast = __ CastPX(__ ctrl(), adr); 3446 Node* cast = __ CastPX(__ ctrl(), adr);
3442 3447
3443 // Divide by card size 3448 // Divide by card size
3459 // Specialized path for CM store barrier 3464 // Specialized path for CM store barrier
3460 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); 3465 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type);
3461 } 3466 }
3462 3467
3463 // Final sync IdealKit and GraphKit. 3468 // Final sync IdealKit and GraphKit.
3464 sync_kit(ideal); 3469 final_sync(ideal);
3465 } 3470 }
3466 3471
3467 // G1 pre/post barriers 3472 // G1 pre/post barriers
3468 void GraphKit::g1_write_barrier_pre(Node* obj, 3473 void GraphKit::g1_write_barrier_pre(Node* obj,
3469 Node* adr, 3474 Node* adr,
3470 uint alias_idx, 3475 uint alias_idx,
3471 Node* val, 3476 Node* val,
3472 const TypeOopPtr* val_type, 3477 const TypeOopPtr* val_type,
3473 BasicType bt) { 3478 BasicType bt) {
3474 IdealKit ideal(gvn(), control(), merged_memory(), true); 3479 IdealKit ideal(this, true);
3475 3480
3476 Node* tls = __ thread(); // ThreadLocalStorage 3481 Node* tls = __ thread(); // ThreadLocalStorage
3477 3482
3478 Node* no_ctrl = NULL; 3483 Node* no_ctrl = NULL;
3479 Node* no_base = __ top(); 3484 Node* no_base = __ top();
3546 } __ end_if(); // (!index) 3551 } __ end_if(); // (!index)
3547 } __ end_if(); // (orig != NULL) 3552 } __ end_if(); // (orig != NULL)
3548 } __ end_if(); // (!marking) 3553 } __ end_if(); // (!marking)
3549 3554
3550 // Final sync IdealKit and GraphKit. 3555 // Final sync IdealKit and GraphKit.
3551 sync_kit(ideal); 3556 final_sync(ideal);
3552 } 3557 }
3553 3558
3554 // 3559 //
3555 // Update the card table and add card address to the queue 3560 // Update the card table and add card address to the queue
3556 // 3561 //
3612 adr = obj; 3617 adr = obj;
3613 } 3618 }
3614 // (Else it's an array (or unknown), and we want more precise card marks.) 3619 // (Else it's an array (or unknown), and we want more precise card marks.)
3615 assert(adr != NULL, ""); 3620 assert(adr != NULL, "");
3616 3621
3617 IdealKit ideal(gvn(), control(), merged_memory(), true); 3622 IdealKit ideal(this, true);
3618 3623
3619 Node* tls = __ thread(); // ThreadLocalStorage 3624 Node* tls = __ thread(); // ThreadLocalStorage
3620 3625
3621 Node* no_base = __ top(); 3626 Node* no_base = __ top();
3622 float likely = PROB_LIKELY(0.999); 3627 float likely = PROB_LIKELY(0.999);
3686 // Object.clone() instrinsic uses this path. 3691 // Object.clone() instrinsic uses this path.
3687 g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf); 3692 g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
3688 } 3693 }
3689 3694
3690 // Final sync IdealKit and GraphKit. 3695 // Final sync IdealKit and GraphKit.
3691 sync_kit(ideal); 3696 final_sync(ideal);
3692 } 3697 }
3693 #undef __ 3698 #undef __