1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
603 virtual const Type *bottom_type() const; // returns Type::MEMORY
604
605 // Map a store opcode to its corresponding own opcode, trivially.
606 virtual int store_Opcode() const { return Opcode(); }
607
608 // have all possible loads of the value stored been optimized away?
609 bool value_never_loaded(PhaseTransform *phase) const;
610
611 MemBarNode* trailing_membar() const;
612 };
613
614 //------------------------------StoreBNode-------------------------------------
615 // Store byte to memory
616 class StoreBNode : public StoreNode {
617 public:
618 StoreBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
619 : StoreNode(c, mem, adr, at, val, mo) {}
620 virtual int Opcode() const;
621 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
622 virtual BasicType memory_type() const { return T_BYTE; }
623 };
624
625 //------------------------------StoreCNode-------------------------------------
626 // Store char/short to memory
627 class StoreCNode : public StoreNode {
628 public:
629 StoreCNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
630 : StoreNode(c, mem, adr, at, val, mo) {}
631 virtual int Opcode() const;
632 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
633 virtual BasicType memory_type() const { return T_CHAR; }
634 };
635
636 //------------------------------StoreINode-------------------------------------
637 // Store int to memory
638 class StoreINode : public StoreNode {
639 public:
640 StoreINode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
641 : StoreNode(c, mem, adr, at, val, mo) {}
642 virtual int Opcode() const;
|
1 /*
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
603 virtual const Type *bottom_type() const; // returns Type::MEMORY
604
605 // Map a store opcode to its corresponding own opcode, trivially.
606 virtual int store_Opcode() const { return Opcode(); }
607
608 // have all possible loads of the value stored been optimized away?
609 bool value_never_loaded(PhaseTransform *phase) const;
610
611 MemBarNode* trailing_membar() const;
612 };
613
614 //------------------------------StoreBNode-------------------------------------
615 // Store byte to memory
616 class StoreBNode : public StoreNode {
617 public:
618 StoreBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
619 : StoreNode(c, mem, adr, at, val, mo) {}
620 virtual int Opcode() const;
621 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
622 virtual BasicType memory_type() const { return T_BYTE; }
623 };
624
625 // Store bit to memory
626 class StoreZ0Node : public StoreBNode {
627 public:
628 StoreZ0Node(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
629 : StoreBNode(c, mem, adr, at, val, mo) {}
630 virtual int Opcode() const;
631 };
632
633 class StoreZ1Node : public StoreBNode {
634 public:
635 StoreZ1Node(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
636 : StoreBNode(c, mem, adr, at, val, mo) {}
637 virtual int Opcode() const;
638 };
639
640 //------------------------------StoreCNode-------------------------------------
641 // Store char/short to memory
642 class StoreCNode : public StoreNode {
643 public:
644 StoreCNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
645 : StoreNode(c, mem, adr, at, val, mo) {}
646 virtual int Opcode() const;
647 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
648 virtual BasicType memory_type() const { return T_CHAR; }
649 };
650
651 //------------------------------StoreINode-------------------------------------
652 // Store int to memory
653 class StoreINode : public StoreNode {
654 public:
655 StoreINode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
656 : StoreNode(c, mem, adr, at, val, mo) {}
657 virtual int Opcode() const;
|