--- old/src/hotspot/share/opto/memnode.hpp 2019-03-11 14:26:50.262354545 +0100 +++ new/src/hotspot/share/opto/memnode.hpp 2019-03-11 14:26:50.050354548 +0100 @@ -1095,9 +1095,11 @@ class ClearArrayNode: public Node { private: bool _is_large; + bool _word_copy_only; public: - ClearArrayNode( Node *ctrl, Node *arymem, Node *word_cnt, Node *base, bool is_large) - : Node(ctrl,arymem,word_cnt,base), _is_large(is_large) { + ClearArrayNode( Node *ctrl, Node *arymem, Node *word_cnt, Node *base, Node* val, bool is_large) + : Node(ctrl, arymem, word_cnt, base, val), _is_large(is_large), + _word_copy_only(val->bottom_type()->isa_long() && (!val->bottom_type()->is_long()->is_con() || val->bottom_type()->is_long()->get_con() != 0)) { init_class_id(Class_ClearArray); } virtual int Opcode() const; @@ -1109,20 +1111,26 @@ virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const; bool is_large() const { return _is_large; } + bool word_copy_only() const { return _word_copy_only; } // Clear the given area of an object or array. // The start offset must always be aligned mod BytesPerInt. // The end offset must always be aligned mod BytesPerLong. // Return the new memory. static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* val, + Node* raw_val, intptr_t start_offset, intptr_t end_offset, PhaseGVN* phase); static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* val, + Node* raw_val, intptr_t start_offset, Node* end_offset, PhaseGVN* phase); static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* raw_val, Node* start_offset, Node* end_offset, PhaseGVN* phase); @@ -1173,7 +1181,7 @@ virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const { return 0; } virtual const Type *bottom_type() const { return TypeTuple::MEMBAR; } - virtual Node *match( const ProjNode *proj, const Matcher *m ); + virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask); // Factory method. Builds a wide or narrow membar. // Optional 'precedent' becomes an extra edge if not null. static MemBarNode* make(Compile* C, int opcode, @@ -1305,7 +1313,7 @@ enum { Incomplete = 0, Complete = 1, - WithArraycopy = 2 + WithArraycopy = 2, }; int _is_complete;