mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
8001532: C2 node files refactoring
Split C2 node files into cast, convert, countbits, intrinsic, move, narrowptr and opaquenode classes Reviewed-by: kvn, morris
This commit is contained in:
parent
77d38feb95
commit
6db303a301
52 changed files with 2574 additions and 2083 deletions
|
@ -866,88 +866,6 @@ public:
|
|||
static bool step_through(Node** np, uint instance_id, PhaseTransform* phase);
|
||||
};
|
||||
|
||||
//------------------------------StrIntrinsic-------------------------------
|
||||
// Base class for Ideal nodes used in String instrinsic code.
|
||||
class StrIntrinsicNode: public Node {
|
||||
public:
|
||||
StrIntrinsicNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* c1, Node* s2, Node* c2):
|
||||
Node(control, char_array_mem, s1, c1, s2, c2) {
|
||||
}
|
||||
|
||||
StrIntrinsicNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* s2, Node* c):
|
||||
Node(control, char_array_mem, s1, s2, c) {
|
||||
}
|
||||
|
||||
StrIntrinsicNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* s2):
|
||||
Node(control, char_array_mem, s1, s2) {
|
||||
}
|
||||
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
|
||||
virtual uint match_edge(uint idx) const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
};
|
||||
|
||||
//------------------------------StrComp-------------------------------------
|
||||
class StrCompNode: public StrIntrinsicNode {
|
||||
public:
|
||||
StrCompNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* c1, Node* s2, Node* c2):
|
||||
StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2) {};
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* bottom_type() const { return TypeInt::INT; }
|
||||
};
|
||||
|
||||
//------------------------------StrEquals-------------------------------------
|
||||
class StrEqualsNode: public StrIntrinsicNode {
|
||||
public:
|
||||
StrEqualsNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* s2, Node* c):
|
||||
StrIntrinsicNode(control, char_array_mem, s1, s2, c) {};
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* bottom_type() const { return TypeInt::BOOL; }
|
||||
};
|
||||
|
||||
//------------------------------StrIndexOf-------------------------------------
|
||||
class StrIndexOfNode: public StrIntrinsicNode {
|
||||
public:
|
||||
StrIndexOfNode(Node* control, Node* char_array_mem,
|
||||
Node* s1, Node* c1, Node* s2, Node* c2):
|
||||
StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2) {};
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* bottom_type() const { return TypeInt::INT; }
|
||||
};
|
||||
|
||||
//------------------------------AryEq---------------------------------------
|
||||
class AryEqNode: public StrIntrinsicNode {
|
||||
public:
|
||||
AryEqNode(Node* control, Node* char_array_mem, Node* s1, Node* s2):
|
||||
StrIntrinsicNode(control, char_array_mem, s1, s2) {};
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* bottom_type() const { return TypeInt::BOOL; }
|
||||
};
|
||||
|
||||
|
||||
//------------------------------EncodeISOArray--------------------------------
|
||||
// encode char[] to byte[] in ISO_8859_1
|
||||
class EncodeISOArrayNode: public Node {
|
||||
public:
|
||||
EncodeISOArrayNode(Node *control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
|
||||
virtual int Opcode() const;
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual const Type* bottom_type() const { return TypeInt::INT; }
|
||||
virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
|
||||
virtual uint match_edge(uint idx) const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
};
|
||||
|
||||
//------------------------------MemBar-----------------------------------------
|
||||
// There are different flavors of Memory Barriers to match the Java Memory
|
||||
// Model. Monitor-enter and volatile-load act as Aquires: no following ref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue