579 class LoadKlassNode : public LoadPNode {
580 private:
581 LoadKlassNode(Node* mem, Node* adr, const TypePtr* at, const TypeKlassPtr* tk, MemOrd mo)
582 : LoadPNode(nullptr, mem, adr, at, tk, mo) {}
583
584 public:
585 virtual int Opcode() const;
586 virtual const Type* Value(PhaseGVN* phase) const;
587 virtual Node* Identity(PhaseGVN* phase);
588
589 // Polymorphic factory method:
590 static Node* make(PhaseGVN& gvn, Node* mem, Node* adr, const TypePtr* at,
591 const TypeKlassPtr* tk = TypeInstKlassPtr::OBJECT);
592 };
593
594 //------------------------------LoadNKlassNode---------------------------------
595 // Load a narrow Klass from an object.
596 // With compact headers, the input address (adr) does not point at the exact
597 // header position where the (narrow) class pointer is located, but into the
598 // middle of the mark word (see oopDesc::klass_offset_in_bytes()). This node
599 // implicitly shifts the loaded value (markWord::klass_shift_at_offset bits) to
600 // extract the actual class pointer. C2's type system is agnostic on whether the
601 // input address directly points into the class pointer.
602 class LoadNKlassNode : public LoadNNode {
603 private:
604 friend Node* LoadKlassNode::make(PhaseGVN&, Node*, Node*, const TypePtr*, const TypeKlassPtr*);
605 LoadNKlassNode(Node* mem, Node* adr, const TypePtr* at, const TypeNarrowKlass* tk, MemOrd mo)
606 : LoadNNode(nullptr, mem, adr, at, tk, mo) {}
607
608 public:
609 virtual int Opcode() const;
610 virtual uint ideal_reg() const { return Op_RegN; }
611 virtual int store_Opcode() const { return Op_StoreNKlass; }
612 virtual BasicType value_basic_type() const { return T_NARROWKLASS; }
613
614 virtual const Type* Value(PhaseGVN* phase) const;
615 virtual Node* Identity(PhaseGVN* phase);
616 };
617
618
619 //------------------------------StoreNode--------------------------------------
620 // Store value; requires Store, Address and Value
621 class StoreNode : public MemNode {
|
579 class LoadKlassNode : public LoadPNode {
580 private:
581 LoadKlassNode(Node* mem, Node* adr, const TypePtr* at, const TypeKlassPtr* tk, MemOrd mo)
582 : LoadPNode(nullptr, mem, adr, at, tk, mo) {}
583
584 public:
585 virtual int Opcode() const;
586 virtual const Type* Value(PhaseGVN* phase) const;
587 virtual Node* Identity(PhaseGVN* phase);
588
589 // Polymorphic factory method:
590 static Node* make(PhaseGVN& gvn, Node* mem, Node* adr, const TypePtr* at,
591 const TypeKlassPtr* tk = TypeInstKlassPtr::OBJECT);
592 };
593
594 //------------------------------LoadNKlassNode---------------------------------
595 // Load a narrow Klass from an object.
596 // With compact headers, the input address (adr) does not point at the exact
597 // header position where the (narrow) class pointer is located, but into the
598 // middle of the mark word (see oopDesc::klass_offset_in_bytes()). This node
599 // implicitly shifts the loaded value to extract the actual class pointer.
600 // C2's type system is agnostic on whether the input address directly points
601 // into the class pointer.
602 class LoadNKlassNode : public LoadNNode {
603 private:
604 friend Node* LoadKlassNode::make(PhaseGVN&, Node*, Node*, const TypePtr*, const TypeKlassPtr*);
605 LoadNKlassNode(Node* mem, Node* adr, const TypePtr* at, const TypeNarrowKlass* tk, MemOrd mo)
606 : LoadNNode(nullptr, mem, adr, at, tk, mo) {}
607
608 public:
609 virtual int Opcode() const;
610 virtual uint ideal_reg() const { return Op_RegN; }
611 virtual int store_Opcode() const { return Op_StoreNKlass; }
612 virtual BasicType value_basic_type() const { return T_NARROWKLASS; }
613
614 virtual const Type* Value(PhaseGVN* phase) const;
615 virtual Node* Identity(PhaseGVN* phase);
616 };
617
618
619 //------------------------------StoreNode--------------------------------------
620 // Store value; requires Store, Address and Value
621 class StoreNode : public MemNode {
|