--- old/src/hotspot/share/opto/memnode.hpp 2018-07-19 11:58:49.938278432 +0100 +++ new/src/hotspot/share/opto/memnode.hpp 2018-07-19 11:58:49.667277616 +0100 @@ -1605,4 +1605,40 @@ virtual const Type *bottom_type() const { return ( AllocatePrefetchStyle == 3 ) ? Type::MEMORY : Type::ABIO; } }; +// cachewb node for guaranteeing writeback of the cache line at a +// given address to (persistent) storage +class CacheWBNode : public Node { +public: + CacheWBNode(Node *ctrl, Node *mem, Node *addr) : Node(ctrl, mem, addr) {} + virtual int Opcode() const; + virtual uint ideal_reg() const { return NotAMachineReg; } + virtual uint match_edge(uint idx) const { return (idx == 2); } + virtual const TypePtr *adr_type() const { return TypeRawPtr::BOTTOM; } + virtual const Type *bottom_type() const { return Type::MEMORY; } +}; + +// cachewb pre sync node for ensuring that writebacks are serialised +// relative to preceding or following stores +class CacheWBPreSyncNode : public Node { +public: + CacheWBPreSyncNode(Node *ctrl, Node *mem) : Node(ctrl, mem) {} + virtual int Opcode() const; + virtual uint ideal_reg() const { return NotAMachineReg; } + virtual uint match_edge(uint idx) const { return false; } + virtual const TypePtr *adr_type() const { return TypeRawPtr::BOTTOM; } + virtual const Type *bottom_type() const { return Type::MEMORY; } +}; + +// cachewb pre sync node for ensuring that writebacks are serialised +// relative to preceding or following stores +class CacheWBPostSyncNode : public Node { +public: + CacheWBPostSyncNode(Node *ctrl, Node *mem) : Node(ctrl, mem) {} + virtual int Opcode() const; + virtual uint ideal_reg() const { return NotAMachineReg; } + virtual uint match_edge(uint idx) const { return false; } + virtual const TypePtr *adr_type() const { return TypeRawPtr::BOTTOM; } + virtual const Type *bottom_type() const { return Type::MEMORY; } +}; + #endif // SHARE_VM_OPTO_MEMNODE_HPP