2550 { |
2550 { |
2551 return bottom_type(); |
2551 return bottom_type(); |
2552 } |
2552 } |
2553 |
2553 |
2554 //============================================================================= |
2554 //============================================================================= |
2555 LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex ) : Node(5) { |
2555 //----------------------------------LoadStoreNode------------------------------ |
|
2556 LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required ) |
|
2557 : Node(required), |
|
2558 _type(rt), |
|
2559 _adr_type(at) |
|
2560 { |
2556 init_req(MemNode::Control, c ); |
2561 init_req(MemNode::Control, c ); |
2557 init_req(MemNode::Memory , mem); |
2562 init_req(MemNode::Memory , mem); |
2558 init_req(MemNode::Address, adr); |
2563 init_req(MemNode::Address, adr); |
2559 init_req(MemNode::ValueIn, val); |
2564 init_req(MemNode::ValueIn, val); |
2560 init_req( ExpectedIn, ex ); |
|
2561 init_class_id(Class_LoadStore); |
2565 init_class_id(Class_LoadStore); |
2562 |
2566 } |
|
2567 |
|
2568 uint LoadStoreNode::ideal_reg() const { |
|
2569 return _type->ideal_reg(); |
|
2570 } |
|
2571 |
|
2572 bool LoadStoreNode::result_not_used() const { |
|
2573 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) { |
|
2574 Node *x = fast_out(i); |
|
2575 if (x->Opcode() == Op_SCMemProj) continue; |
|
2576 return false; |
|
2577 } |
|
2578 return true; |
|
2579 } |
|
2580 |
|
2581 uint LoadStoreNode::size_of() const { return sizeof(*this); } |
|
2582 |
|
2583 //============================================================================= |
|
2584 //----------------------------------LoadStoreConditionalNode-------------------- |
|
2585 LoadStoreConditionalNode::LoadStoreConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex ) : LoadStoreNode(c, mem, adr, val, NULL, TypeInt::BOOL, 5) { |
|
2586 init_req(ExpectedIn, ex ); |
2563 } |
2587 } |
2564 |
2588 |
2565 //============================================================================= |
2589 //============================================================================= |
2566 //-------------------------------adr_type-------------------------------------- |
2590 //-------------------------------adr_type-------------------------------------- |
2567 // Do we Match on this edge index or not? Do not match memory |
2591 // Do we Match on this edge index or not? Do not match memory |