< prev index next >
src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.hpp
Print this page
rev 52851 : Streamline CAS barriers, C2 ideal graph generation and matching
*** 287,292 ****
void fix_mem(Node* ctrl, Node* region, Node* mem, Node* mem_for_ctrl, Node* mem_phi, Unique_Node_List& uses);
int alias() const { return _alias; }
void remove(Node* n);
};
! #endif // SHARE_VM_GC_SHENANDOAH_C2_SHENANDOAH_SUPPORT_HPP
--- 287,383 ----
void fix_mem(Node* ctrl, Node* region, Node* mem, Node* mem_for_ctrl, Node* mem_phi, Unique_Node_List& uses);
int alias() const { return _alias; }
void remove(Node* n);
};
! class ShenandoahCompareAndSwapPNode : public CompareAndSwapPNode {
! public:
! ShenandoahCompareAndSwapPNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, MemNode::MemOrd mem_ord)
! : CompareAndSwapPNode(c, mem, adr, val, ex, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypePtr::NULL_PTR) {
! return new CompareAndSwapPNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
! class ShenandoahCompareAndSwapNNode : public CompareAndSwapNNode {
! public:
! ShenandoahCompareAndSwapNNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, MemNode::MemOrd mem_ord)
! : CompareAndSwapNNode(c, mem, adr, val, ex, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypeNarrowOop::NULL_PTR) {
! return new CompareAndSwapNNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
! class ShenandoahWeakCompareAndSwapPNode : public WeakCompareAndSwapPNode {
! public:
! ShenandoahWeakCompareAndSwapPNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, MemNode::MemOrd mem_ord)
! : WeakCompareAndSwapPNode(c, mem, adr, val, ex, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypePtr::NULL_PTR) {
! return new WeakCompareAndSwapPNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
! class ShenandoahWeakCompareAndSwapNNode : public WeakCompareAndSwapNNode {
! public:
! ShenandoahWeakCompareAndSwapNNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, MemNode::MemOrd mem_ord)
! : WeakCompareAndSwapNNode(c, mem, adr, val, ex, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypeNarrowOop::NULL_PTR) {
! return new WeakCompareAndSwapNNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
! class ShenandoahCompareAndExchangePNode : public CompareAndExchangePNode {
! public:
! ShenandoahCompareAndExchangePNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, const TypePtr* at, const Type* t, MemNode::MemOrd mem_ord)
! : CompareAndExchangePNode(c, mem, adr, val, ex, at, t, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypePtr::NULL_PTR) {
! return new CompareAndExchangePNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), adr_type(), bottom_type(), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
! class ShenandoahCompareAndExchangeNNode : public CompareAndExchangeNNode {
! public:
! ShenandoahCompareAndExchangeNNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex, const TypePtr* at, const Type* t, MemNode::MemOrd mem_ord)
! : CompareAndExchangeNNode(c, mem, adr, val, ex, at, t, mem_ord) { }
!
! virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) {
! if (in(ExpectedIn) != NULL && phase->type(in(ExpectedIn)) == TypeNarrowOop::NULL_PTR) {
! return new CompareAndExchangeNNode(in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), in(MemNode::ValueIn), in(ExpectedIn), adr_type(), bottom_type(), order());
! }
! return NULL;
! }
!
! virtual int Opcode() const;
! };
!
!
! #endif // SHARE_GC_SHENANDOAH_C2_SHENANDOAHSUPPORT_HPP
< prev index next >