src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6827605 Sdiff src/share/vm/opto

src/share/vm/opto/memnode.cpp

Print this page




2481   }
2482   if (done_offset > start_offset) {
2483     mem = clear_memory(ctl, mem, dest,
2484                        start_offset, phase->MakeConX(done_offset), phase);
2485   }
2486   if (done_offset < end_offset) { // emit the final 32-bit store
2487     Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(done_offset));
2488     adr = phase->transform(adr);
2489     const TypePtr* atp = TypeRawPtr::BOTTOM;
2490     mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT);
2491     mem = phase->transform(mem);
2492     done_offset += BytesPerInt;
2493   }
2494   assert(done_offset == end_offset, "");
2495   return mem;
2496 }
2497 
2498 //=============================================================================
2499 // Do we match on this edge? No memory edges
2500 uint StrCompNode::match_edge(uint idx) const {
2501   return idx == 5 || idx == 6;
2502 }
2503 
2504 //------------------------------Ideal------------------------------------------
2505 // Return a node which is more "ideal" than the current node.  Strip out
2506 // control copies
2507 Node *StrCompNode::Ideal(PhaseGVN *phase, bool can_reshape){
2508   return remove_dead_region(phase, can_reshape) ? this : NULL;
2509 }
2510 

2511 // Do we match on this edge? No memory edges
2512 uint StrEqualsNode::match_edge(uint idx) const {
2513   return idx == 5 || idx == 6;
2514 }
2515 
2516 //------------------------------Ideal------------------------------------------
2517 // Return a node which is more "ideal" than the current node.  Strip out
2518 // control copies
2519 Node *StrEqualsNode::Ideal(PhaseGVN *phase, bool can_reshape){
2520   return remove_dead_region(phase, can_reshape) ? this : NULL;
2521 }
2522 
2523 //=============================================================================
2524 // Do we match on this edge? No memory edges
2525 uint StrIndexOfNode::match_edge(uint idx) const {
2526   return idx == 5 || idx == 6;
2527 }
2528 
2529 //------------------------------Ideal------------------------------------------
2530 // Return a node which is more "ideal" than the current node.  Strip out
2531 // control copies
2532 Node *StrIndexOfNode::Ideal(PhaseGVN *phase, bool can_reshape){
2533   return remove_dead_region(phase, can_reshape) ? this : NULL;
2534 }
2535 





2536 //------------------------------Ideal------------------------------------------
2537 // Return a node which is more "ideal" than the current node.  Strip out
2538 // control copies
2539 Node *AryEqNode::Ideal(PhaseGVN *phase, bool can_reshape){
2540   return remove_dead_region(phase, can_reshape) ? this : NULL;
2541 }
2542 
2543 //=============================================================================
2544 MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent)
2545   : MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)),
2546     _adr_type(C->get_adr_type(alias_idx))
2547 {
2548   init_class_id(Class_MemBar);
2549   Node* top = C->top();
2550   init_req(TypeFunc::I_O,top);
2551   init_req(TypeFunc::FramePtr,top);
2552   init_req(TypeFunc::ReturnAdr,top);
2553   if (precedent != NULL)
2554     init_req(TypeFunc::Parms, precedent);
2555 }




2481   }
2482   if (done_offset > start_offset) {
2483     mem = clear_memory(ctl, mem, dest,
2484                        start_offset, phase->MakeConX(done_offset), phase);
2485   }
2486   if (done_offset < end_offset) { // emit the final 32-bit store
2487     Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(done_offset));
2488     adr = phase->transform(adr);
2489     const TypePtr* atp = TypeRawPtr::BOTTOM;
2490     mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT);
2491     mem = phase->transform(mem);
2492     done_offset += BytesPerInt;
2493   }
2494   assert(done_offset == end_offset, "");
2495   return mem;
2496 }
2497 
2498 //=============================================================================
2499 // Do we match on this edge? No memory edges
2500 uint StrCompNode::match_edge(uint idx) const {
2501   return idx == 2 || idx == 3; // StrComp (Binary str1 cnt1) (Binary str2 cnt2)
2502 }
2503 
2504 //------------------------------Ideal------------------------------------------
2505 // Return a node which is more "ideal" than the current node.  Strip out
2506 // control copies
2507 Node *StrCompNode::Ideal(PhaseGVN *phase, bool can_reshape){
2508   return remove_dead_region(phase, can_reshape) ? this : NULL;
2509 }
2510 
2511 //=============================================================================
2512 // Do we match on this edge? No memory edges
2513 uint StrEqualsNode::match_edge(uint idx) const {
2514   return idx == 2 || idx == 3; // StrEquals (Binary str1 str2) cnt
2515 }
2516 
2517 //------------------------------Ideal------------------------------------------
2518 // Return a node which is more "ideal" than the current node.  Strip out
2519 // control copies
2520 Node *StrEqualsNode::Ideal(PhaseGVN *phase, bool can_reshape){
2521   return remove_dead_region(phase, can_reshape) ? this : NULL;
2522 }
2523 
2524 //=============================================================================
2525 // Do we match on this edge? No memory edges
2526 uint StrIndexOfNode::match_edge(uint idx) const {
2527   return idx == 2 || idx == 3; // StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)
2528 }
2529 
2530 //------------------------------Ideal------------------------------------------
2531 // Return a node which is more "ideal" than the current node.  Strip out
2532 // control copies
2533 Node *StrIndexOfNode::Ideal(PhaseGVN *phase, bool can_reshape){
2534   return remove_dead_region(phase, can_reshape) ? this : NULL;
2535 }
2536 
2537 //=============================================================================
2538 // Do we match on this edge? No memory edges
2539 uint AryEqNode::match_edge(uint idx) const {
2540   return idx == 2 || idx == 3; // StrEquals ary1 ary2
2541 }
2542 //------------------------------Ideal------------------------------------------
2543 // Return a node which is more "ideal" than the current node.  Strip out
2544 // control copies
2545 Node *AryEqNode::Ideal(PhaseGVN *phase, bool can_reshape){
2546   return remove_dead_region(phase, can_reshape) ? this : NULL;
2547 }
2548 
2549 //=============================================================================
2550 MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent)
2551   : MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)),
2552     _adr_type(C->get_adr_type(alias_idx))
2553 {
2554   init_class_id(Class_MemBar);
2555   Node* top = C->top();
2556   init_req(TypeFunc::I_O,top);
2557   init_req(TypeFunc::FramePtr,top);
2558   init_req(TypeFunc::ReturnAdr,top);
2559   if (precedent != NULL)
2560     init_req(TypeFunc::Parms, precedent);
2561 }


src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File