src/share/vm/opto/vectornode.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
7119644 Cdiff src/share/vm/opto/vectornode.hpp
src/share/vm/opto/vectornode.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 29,1016 ****
#include "opto/node.hpp"
#include "opto/opcodes.hpp"
//------------------------------VectorNode--------------------------------------
// Vector Operation
! class VectorNode : public Node {
! virtual uint size_of() const { return sizeof(*this); }
! protected:
! uint _length; // vector length
! virtual BasicType elt_basic_type() const = 0; // Vector element basic type
!
! static const Type* vect_type(BasicType elt_bt, uint len);
! static const Type* vect_type(const Type* elt_type, uint len) {
! return vect_type(elt_type->array_element_basic_type(), len);
! }
!
public:
- friend class VectorLoadNode; // For vect_type
- friend class VectorStoreNode; // ditto.
! VectorNode(Node* n1, uint vlen) : Node(NULL, n1), _length(vlen) {
init_class_id(Class_Vector);
}
! VectorNode(Node* n1, Node* n2, uint vlen) : Node(NULL, n1, n2), _length(vlen) {
init_class_id(Class_Vector);
}
- virtual int Opcode() const;
! uint length() const { return _length; } // Vector length
! static uint max_vlen(BasicType bt) { // max vector length
! return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes(bt));
! }
! // Element and vector type
! const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
! const Type* vect_type() const { return vect_type(elt_basic_type(), length()); }
- virtual const Type *bottom_type() const { return vect_type(); }
- virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
-
- // Vector opcode from scalar opcode
- static int opcode(int sopc, uint vlen, const Type* opd_t);
-
static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
! static VectorNode* make(Compile* C, int sopc, Node* n1, Node* n2, uint vlen, const Type* elt_t);
};
//===========================Vector=ALU=Operations====================================
//------------------------------AddVBNode---------------------------------------
// Vector add byte
class AddVBNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! AddVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVCNode---------------------------------------
// Vector add char
class AddVCNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! AddVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVSNode---------------------------------------
// Vector add short
class AddVSNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! AddVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVINode---------------------------------------
// Vector add int
class AddVINode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
public:
! AddVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVLNode---------------------------------------
// Vector add long
class AddVLNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_LONG; }
public:
! AddVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVFNode---------------------------------------
// Vector add float
class AddVFNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
public:
! AddVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AddVDNode---------------------------------------
// Vector add double
class AddVDNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
public:
! AddVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVBNode---------------------------------------
// Vector subtract byte
class SubVBNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! SubVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVCNode---------------------------------------
// Vector subtract char
class SubVCNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! SubVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVSNode---------------------------------------
// Vector subtract short
class SubVSNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! SubVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVINode---------------------------------------
// Vector subtract int
class SubVINode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
public:
! SubVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVLNode---------------------------------------
// Vector subtract long
class SubVLNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_LONG; }
public:
! SubVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVFNode---------------------------------------
// Vector subtract float
class SubVFNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
public:
! SubVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------SubVDNode---------------------------------------
// Vector subtract double
class SubVDNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
public:
! SubVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------MulVFNode---------------------------------------
// Vector multiply float
class MulVFNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
public:
! MulVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------MulVDNode---------------------------------------
// Vector multiply double
class MulVDNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
public:
! MulVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------DivVFNode---------------------------------------
// Vector divide float
class DivVFNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
public:
! DivVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------DivVDNode---------------------------------------
// Vector Divide double
class DivVDNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
public:
! DivVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------LShiftVBNode---------------------------------------
// Vector lshift byte
class LShiftVBNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! LShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------LShiftVCNode---------------------------------------
// Vector lshift chars
class LShiftVCNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! LShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------LShiftVSNode---------------------------------------
// Vector lshift shorts
class LShiftVSNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! LShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------LShiftVINode---------------------------------------
// Vector lshift ints
class LShiftVINode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
public:
! LShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------URShiftVBNode---------------------------------------
// Vector urshift bytes
! class URShiftVBNode : public VectorNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! URShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------URShiftVCNode---------------------------------------
// Vector urshift char
! class URShiftVCNode : public VectorNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! URShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------URShiftVSNode---------------------------------------
// Vector urshift shorts
! class URShiftVSNode : public VectorNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! URShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------URShiftVINode---------------------------------------
// Vector urshift ints
! class URShiftVINode : public VectorNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_INT; }
public:
! URShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
virtual int Opcode() const;
};
//------------------------------AndVNode---------------------------------------
// Vector and
class AndVNode : public VectorNode {
- protected:
- BasicType _bt;
- virtual BasicType elt_basic_type() const { return _bt; }
public:
! AndVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
virtual int Opcode() const;
};
//------------------------------OrVNode---------------------------------------
// Vector or
class OrVNode : public VectorNode {
- protected:
- BasicType _bt;
- virtual BasicType elt_basic_type() const { return _bt; }
public:
! OrVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
virtual int Opcode() const;
};
//------------------------------XorVNode---------------------------------------
// Vector xor
class XorVNode : public VectorNode {
- protected:
- BasicType _bt;
- virtual BasicType elt_basic_type() const { return _bt; }
public:
! XorVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
virtual int Opcode() const;
};
! //================================= M E M O R Y ==================================
!
! //------------------------------VectorLoadNode--------------------------------------
! // Vector Load from memory
! class VectorLoadNode : public LoadNode {
! virtual uint size_of() const { return sizeof(*this); }
!
! protected:
! virtual BasicType elt_basic_type() const = 0; // Vector element basic type
! // For use in constructor
! static const Type* vect_type(const Type* elt_type, uint len) {
! return VectorNode::vect_type(elt_type, len);
! }
!
public:
! VectorLoadNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *rt)
! : LoadNode(c,mem,adr,at,rt) {
! init_class_id(Class_VectorLoad);
}
- virtual int Opcode() const;
! virtual uint length() const = 0; // Vector length
! // Element and vector type
! const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
! const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
! virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
virtual BasicType memory_type() const { return T_VOID; }
! virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
! // Vector opcode from scalar opcode
! static int opcode(int sopc, uint vlen);
! static VectorLoadNode* make(Compile* C, int opc, Node* ctl, Node* mem,
! Node* adr, const TypePtr* atyp, uint vlen);
};
! //------------------------------Load16BNode--------------------------------------
! // Vector load of 16 bytes (8bits signed) from memory
! class Load16BNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! Load16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,16)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store16B; }
! virtual uint length() const { return 16; }
! };
! //------------------------------Load8BNode--------------------------------------
! // Vector load of 8 bytes (8bits signed) from memory
! class Load8BNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
! public:
! Load8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store8B; }
! virtual uint length() const { return 8; }
! };
- //------------------------------Load4BNode--------------------------------------
- // Vector load of 4 bytes (8bits signed) from memory
- class Load4BNode : public VectorLoadNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
- public:
- Load4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
- : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
virtual int Opcode() const;
- virtual int store_Opcode() const { return Op_Store4B; }
- virtual uint length() const { return 4; }
- };
! //------------------------------Load8CNode--------------------------------------
! // Vector load of 8 chars (16bits unsigned) from memory
! class Load8CNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
! public:
! Load8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store8C; }
! virtual uint length() const { return 8; }
! };
!
! //------------------------------Load4CNode--------------------------------------
! // Vector load of 4 chars (16bits unsigned) from memory
! class Load4CNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
! public:
! Load4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store4C; }
! virtual uint length() const { return 4; }
! };
!
! //------------------------------Load2CNode--------------------------------------
! // Vector load of 2 chars (16bits unsigned) from memory
! class Load2CNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
! public:
! Load2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2C; }
! virtual uint length() const { return 2; }
! };
!
! //------------------------------Load8SNode--------------------------------------
! // Vector load of 8 shorts (16bits signed) from memory
! class Load8SNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_SHORT; }
! public:
! Load8SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store8C; }
! virtual uint length() const { return 8; }
! };
!
! //------------------------------Load4SNode--------------------------------------
! // Vector load of 4 shorts (16bits signed) from memory
! class Load4SNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_SHORT; }
! public:
! Load4SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store4C; }
! virtual uint length() const { return 4; }
! };
!
! //------------------------------Load2SNode--------------------------------------
! // Vector load of 2 shorts (16bits signed) from memory
! class Load2SNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_SHORT; }
! public:
! Load2SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2C; }
! virtual uint length() const { return 2; }
! };
!
! //------------------------------Load4INode--------------------------------------
! // Vector load of 4 integers (32bits signed) from memory
! class Load4INode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_INT; }
! public:
! Load4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store4I; }
! virtual uint length() const { return 4; }
! };
!
! //------------------------------Load2INode--------------------------------------
! // Vector load of 2 integers (32bits signed) from memory
! class Load2INode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_INT; }
! public:
! Load2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
! : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2I; }
! virtual uint length() const { return 2; }
! };
!
! //------------------------------Load2LNode--------------------------------------
! // Vector load of 2 longs (64bits signed) from memory
! class Load2LNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_LONG; }
! public:
! Load2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong *tl = TypeLong::LONG)
! : VectorLoadNode(c,mem,adr,at,vect_type(tl,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2L; }
! virtual uint length() const { return 2; }
! };
!
! //------------------------------Load4FNode--------------------------------------
! // Vector load of 4 floats (32bits) from memory
! class Load4FNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_FLOAT; }
! public:
! Load4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
! : VectorLoadNode(c,mem,adr,at,vect_type(t,4)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store4F; }
! virtual uint length() const { return 4; }
! };
!
! //------------------------------Load2FNode--------------------------------------
! // Vector load of 2 floats (32bits) from memory
! class Load2FNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_FLOAT; }
! public:
! Load2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
! : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2F; }
! virtual uint length() const { return 2; }
! };
!
! //------------------------------Load2DNode--------------------------------------
! // Vector load of 2 doubles (64bits) from memory
! class Load2DNode : public VectorLoadNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_DOUBLE; }
! public:
! Load2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::DOUBLE)
! : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
! virtual int Opcode() const;
! virtual int store_Opcode() const { return Op_Store2D; }
! virtual uint length() const { return 2; }
! };
!
!
! //------------------------------VectorStoreNode--------------------------------------
! // Vector Store to memory
! class VectorStoreNode : public StoreNode {
! virtual uint size_of() const { return sizeof(*this); }
!
! protected:
! virtual BasicType elt_basic_type() const = 0; // Vector element basic type
!
! public:
! VectorStoreNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : StoreNode(c,mem,adr,at,val) {
! init_class_id(Class_VectorStore);
! }
! virtual int Opcode() const;
!
! virtual uint length() const = 0; // Vector length
!
! // Element and vector type
! const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
! const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
!
! virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
virtual BasicType memory_type() const { return T_VOID; }
! virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
! // Vector opcode from scalar opcode
! static int opcode(int sopc, uint vlen);
!
! static VectorStoreNode* make(Compile* C, int opc, Node* ctl, Node* mem,
Node* adr, const TypePtr* atyp, Node* val,
uint vlen);
};
- //------------------------------Store16BNode--------------------------------------
- // Vector store of 16 bytes (8bits signed) to memory
- class Store16BNode : public VectorStoreNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
- public:
- Store16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
- : VectorStoreNode(c,mem,adr,at,val) {}
- virtual int Opcode() const;
- virtual uint length() const { return 16; }
- };
! //------------------------------Store8BNode--------------------------------------
! // Vector store of 8 bytes (8bits signed) to memory
! class Store8BNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
! public:
! Store8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
! virtual int Opcode() const;
! virtual uint length() const { return 8; }
! };
! //------------------------------Store4BNode--------------------------------------
! // Vector store of 4 bytes (8bits signed) to memory
! class Store4BNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! Store4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 4; }
};
! //------------------------------Store8CNode--------------------------------------
! // Vector store of 8 chars (16bits signed/unsigned) to memory
! class Store8CNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! Store8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 8; }
};
! //------------------------------Store4CNode--------------------------------------
! // Vector store of 4 chars (16bits signed/unsigned) to memory
! class Store4CNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! Store4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 4; }
};
! //------------------------------Store2CNode--------------------------------------
! // Vector store of 2 chars (16bits signed/unsigned) to memory
! class Store2CNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! Store2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 2; }
};
! //------------------------------Store4INode--------------------------------------
! // Vector store of 4 integers (32bits signed) to memory
! class Store4INode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_INT; }
public:
! Store4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 4; }
};
! //------------------------------Store2INode--------------------------------------
! // Vector store of 2 integers (32bits signed) to memory
! class Store2INode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_INT; }
public:
! Store2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 2; }
};
! //------------------------------Store2LNode--------------------------------------
! // Vector store of 2 longs (64bits signed) to memory
! class Store2LNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_LONG; }
public:
! Store2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
virtual int Opcode() const;
- virtual uint length() const { return 2; }
};
! //------------------------------Store4FNode--------------------------------------
! // Vector store of 4 floats (32bits) to memory
! class Store4FNode : public VectorStoreNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_FLOAT; }
! public:
! Store4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : VectorStoreNode(c,mem,adr,at,val) {}
! virtual int Opcode() const;
! virtual uint length() const { return 4; }
! };
- //------------------------------Store2FNode--------------------------------------
- // Vector store of 2 floats (32bits) to memory
- class Store2FNode : public VectorStoreNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
- public:
- Store2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
- : VectorStoreNode(c,mem,adr,at,val) {}
- virtual int Opcode() const;
- virtual uint length() const { return 2; }
- };
-
- //------------------------------Store2DNode--------------------------------------
- // Vector store of 2 doubles (64bits) to memory
- class Store2DNode : public VectorStoreNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
- public:
- Store2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
- : VectorStoreNode(c,mem,adr,at,val) {}
- virtual int Opcode() const;
- virtual uint length() const { return 2; }
- };
-
- //=========================Promote_Scalar_to_Vector====================================
-
- //------------------------------Replicate16BNode---------------------------------------
- // Replicate byte scalar to be vector of 16 bytes
- class Replicate16BNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
- public:
- Replicate16BNode(Node* in1) : VectorNode(in1, 16) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate8BNode---------------------------------------
- // Replicate byte scalar to be vector of 8 bytes
- class Replicate8BNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
- public:
- Replicate8BNode(Node* in1) : VectorNode(in1, 8) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate4BNode---------------------------------------
- // Replicate byte scalar to be vector of 4 bytes
- class Replicate4BNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
- public:
- Replicate4BNode(Node* in1) : VectorNode(in1, 4) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate8CNode---------------------------------------
- // Replicate char scalar to be vector of 8 chars
- class Replicate8CNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
- public:
- Replicate8CNode(Node* in1) : VectorNode(in1, 8) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate4CNode---------------------------------------
- // Replicate char scalar to be vector of 4 chars
- class Replicate4CNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
- public:
- Replicate4CNode(Node* in1) : VectorNode(in1, 4) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2CNode---------------------------------------
- // Replicate char scalar to be vector of 2 chars
- class Replicate2CNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
- public:
- Replicate2CNode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate8SNode---------------------------------------
- // Replicate short scalar to be vector of 8 shorts
- class Replicate8SNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
- public:
- Replicate8SNode(Node* in1) : VectorNode(in1, 8) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate4SNode---------------------------------------
- // Replicate short scalar to be vector of 4 shorts
- class Replicate4SNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
- public:
- Replicate4SNode(Node* in1) : VectorNode(in1, 4) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2SNode---------------------------------------
- // Replicate short scalar to be vector of 2 shorts
- class Replicate2SNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
- public:
- Replicate2SNode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate4INode---------------------------------------
- // Replicate int scalar to be vector of 4 ints
- class Replicate4INode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
- public:
- Replicate4INode(Node* in1) : VectorNode(in1, 4) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2INode---------------------------------------
- // Replicate int scalar to be vector of 2 ints
- class Replicate2INode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
- public:
- Replicate2INode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2LNode---------------------------------------
- // Replicate long scalar to be vector of 2 longs
- class Replicate2LNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_LONG; }
- public:
- Replicate2LNode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate4FNode---------------------------------------
- // Replicate float scalar to be vector of 4 floats
- class Replicate4FNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
- public:
- Replicate4FNode(Node* in1) : VectorNode(in1, 4) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2FNode---------------------------------------
- // Replicate float scalar to be vector of 2 floats
- class Replicate2FNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
- public:
- Replicate2FNode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //------------------------------Replicate2DNode---------------------------------------
- // Replicate double scalar to be vector of 2 doubles
- class Replicate2DNode : public VectorNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
- public:
- Replicate2DNode(Node* in1) : VectorNode(in1, 2) {}
- virtual int Opcode() const;
- };
-
- //========================Pack_Scalars_into_a_Vector==============================
-
//------------------------------PackNode---------------------------------------
// Pack parent class (not for code generation).
class PackNode : public VectorNode {
public:
! PackNode(Node* in1) : VectorNode(in1, 1) {}
! PackNode(Node* in1, Node* n2) : VectorNode(in1, n2, 2) {}
virtual int Opcode() const;
! void add_opd(Node* n) {
! add_req(n);
! _length++;
! assert(_length == req() - 1, "vector length matches edge count");
}
// Create a binary tree form for Packs. [lo, hi) (half-open) range
Node* binaryTreePack(Compile* C, int lo, int hi);
! static PackNode* make(Compile* C, Node* s, const Type* elt_t);
};
//------------------------------PackBNode---------------------------------------
// Pack byte scalars into vector
class PackBNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! PackBNode(Node* in1) : PackNode(in1) {}
virtual int Opcode() const;
};
//------------------------------PackCNode---------------------------------------
// Pack char scalars into vector
class PackCNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
public:
! PackCNode(Node* in1) : PackNode(in1) {}
virtual int Opcode() const;
};
//------------------------------PackSNode---------------------------------------
// Pack short scalars into a vector
class PackSNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_SHORT; }
public:
! PackSNode(Node* in1) : PackNode(in1) {}
virtual int Opcode() const;
};
//------------------------------PackINode---------------------------------------
// Pack integer scalars into a vector
class PackINode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_INT; }
public:
! PackINode(Node* in1) : PackNode(in1) {}
! PackINode(Node* in1, Node* in2) : PackNode(in1, in2) {}
virtual int Opcode() const;
};
//------------------------------PackLNode---------------------------------------
// Pack long scalars into a vector
class PackLNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_LONG; }
public:
! PackLNode(Node* in1) : PackNode(in1) {}
! PackLNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
virtual int Opcode() const;
};
//------------------------------PackFNode---------------------------------------
// Pack float scalars into vector
class PackFNode : public PackNode {
protected:
virtual BasicType elt_basic_type() const { return T_FLOAT; }
--- 29,481 ----
#include "opto/node.hpp"
#include "opto/opcodes.hpp"
//------------------------------VectorNode--------------------------------------
// Vector Operation
! class VectorNode : public TypeNode {
public:
! VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
init_class_id(Class_Vector);
+ init_req(1, n1);
}
! VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
init_class_id(Class_Vector);
+ init_req(1, n1);
+ init_req(2, n2);
}
! const TypeVect* vect_type() const { return type()->is_vect(); }
! uint length() const { return vect_type()->length(); } // Vector length
! virtual int Opcode() const;
! virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
! static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
+ static int opcode(int opc, uint vlen, BasicType bt);
+ static bool implemented(int opc, uint vlen, BasicType bt);
+
};
//===========================Vector=ALU=Operations====================================
//------------------------------AddVBNode---------------------------------------
// Vector add byte
class AddVBNode : public VectorNode {
public:
! AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVCNode---------------------------------------
// Vector add char
class AddVCNode : public VectorNode {
public:
! AddVCNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVSNode---------------------------------------
// Vector add short
class AddVSNode : public VectorNode {
public:
! AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVINode---------------------------------------
// Vector add int
class AddVINode : public VectorNode {
public:
! AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVLNode---------------------------------------
// Vector add long
class AddVLNode : public VectorNode {
public:
! AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVFNode---------------------------------------
// Vector add float
class AddVFNode : public VectorNode {
public:
! AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AddVDNode---------------------------------------
// Vector add double
class AddVDNode : public VectorNode {
public:
! AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVBNode---------------------------------------
// Vector subtract byte
class SubVBNode : public VectorNode {
public:
! SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVCNode---------------------------------------
// Vector subtract char
class SubVCNode : public VectorNode {
public:
! SubVCNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVSNode---------------------------------------
// Vector subtract short
class SubVSNode : public VectorNode {
public:
! SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVINode---------------------------------------
// Vector subtract int
class SubVINode : public VectorNode {
public:
! SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVLNode---------------------------------------
// Vector subtract long
class SubVLNode : public VectorNode {
public:
! SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVFNode---------------------------------------
// Vector subtract float
class SubVFNode : public VectorNode {
public:
! SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------SubVDNode---------------------------------------
// Vector subtract double
class SubVDNode : public VectorNode {
public:
! SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------MulVFNode---------------------------------------
// Vector multiply float
class MulVFNode : public VectorNode {
public:
! MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------MulVDNode---------------------------------------
// Vector multiply double
class MulVDNode : public VectorNode {
public:
! MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------DivVFNode---------------------------------------
// Vector divide float
class DivVFNode : public VectorNode {
public:
! DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------DivVDNode---------------------------------------
// Vector Divide double
class DivVDNode : public VectorNode {
public:
! DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------LShiftVBNode---------------------------------------
// Vector lshift byte
class LShiftVBNode : public VectorNode {
public:
! LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------LShiftVCNode---------------------------------------
// Vector lshift chars
class LShiftVCNode : public VectorNode {
public:
! LShiftVCNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------LShiftVSNode---------------------------------------
// Vector lshift shorts
class LShiftVSNode : public VectorNode {
public:
! LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------LShiftVINode---------------------------------------
// Vector lshift ints
class LShiftVINode : public VectorNode {
public:
! LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------URShiftVBNode---------------------------------------
// Vector urshift bytes
! class RShiftVBNode : public VectorNode {
public:
! RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------URShiftVCNode---------------------------------------
// Vector urshift char
! class RShiftVCNode : public VectorNode {
public:
! RShiftVCNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------URShiftVSNode---------------------------------------
// Vector urshift shorts
! class RShiftVSNode : public VectorNode {
public:
! RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------URShiftVINode---------------------------------------
// Vector urshift ints
! class RShiftVINode : public VectorNode {
public:
! RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------AndVNode---------------------------------------
// Vector and
class AndVNode : public VectorNode {
public:
! AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------OrVNode---------------------------------------
// Vector or
class OrVNode : public VectorNode {
public:
! OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
//------------------------------XorVNode---------------------------------------
// Vector xor
class XorVNode : public VectorNode {
public:
! XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
virtual int Opcode() const;
};
! //================================= M E M O R Y ===============================
! //------------------------------LoadVectorNode---------------------------------
! // Load Vector from memory
! class LoadVectorNode : public LoadNode {
public:
! LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt)
! : LoadNode(c, mem, adr, at, vt) {
! init_class_id(Class_LoadVector);
}
! const TypeVect* vect_type() const { return type()->is_vect(); }
! uint length() const { return vect_type()->length(); } // Vector length
! virtual int Opcode() const;
! virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
virtual BasicType memory_type() const { return T_VOID; }
! virtual int memory_size() const { return vect_type()->length_in_bytes(); }
! virtual int store_Opcode() const { return Op_StoreVector; }
! static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
! Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
};
! //------------------------------StoreVectorNode--------------------------------
! // Store Vector to memory
! class StoreVectorNode : public StoreNode {
public:
! StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
! : StoreNode(c, mem, adr, at, val) {
! assert(val->is_Vector() || val->is_LoadVector(), "sanity");
! init_class_id(Class_StoreVector);
! }
! const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
! uint length() const { return vect_type()->length(); } // Vector length
virtual int Opcode() const;
! virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
virtual BasicType memory_type() const { return T_VOID; }
! virtual int memory_size() const { return vect_type()->length_in_bytes(); }
! static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
Node* adr, const TypePtr* atyp, Node* val,
uint vlen);
};
! //=========================Promote_Scalar_to_Vector============================
! //------------------------------ReplicateBNode---------------------------------
! // Replicate byte scalar to be vector
! class ReplicateBNode : public VectorNode {
public:
! ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateCNode---------------------------------
! // Replicate char scalar to be vector
! class ReplicateCNode : public VectorNode {
public:
! ReplicateCNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateSNode---------------------------------
! // Replicate short scalar to be vector
! class ReplicateSNode : public VectorNode {
public:
! ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateINode---------------------------------
! // Replicate int scalar to be vector
! class ReplicateINode : public VectorNode {
public:
! ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateLNode---------------------------------
! // Replicate long scalar to be vector
! class ReplicateLNode : public VectorNode {
public:
! ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateFNode---------------------------------
! // Replicate float scalar to be vector
! class ReplicateFNode : public VectorNode {
public:
! ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //------------------------------ReplicateDNode---------------------------------
! // Replicate double scalar to be vector
! class ReplicateDNode : public VectorNode {
public:
! ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
virtual int Opcode() const;
};
! //========================Pack_Scalars_into_a_Vector===========================
//------------------------------PackNode---------------------------------------
// Pack parent class (not for code generation).
class PackNode : public VectorNode {
public:
! PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
! PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
virtual int Opcode() const;
! void add_opd(uint i, Node* n) {
! init_req(i+1, n);
}
// Create a binary tree form for Packs. [lo, hi) (half-open) range
Node* binaryTreePack(Compile* C, int lo, int hi);
! static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
};
//------------------------------PackBNode---------------------------------------
// Pack byte scalars into vector
class PackBNode : public PackNode {
public:
! PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
virtual int Opcode() const;
};
//------------------------------PackCNode---------------------------------------
// Pack char scalars into vector
class PackCNode : public PackNode {
public:
! PackCNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
virtual int Opcode() const;
};
//------------------------------PackSNode---------------------------------------
// Pack short scalars into a vector
class PackSNode : public PackNode {
public:
! PackSNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
! PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
//------------------------------PackINode---------------------------------------
// Pack integer scalars into a vector
class PackINode : public PackNode {
public:
! PackINode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
! PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
//------------------------------PackLNode---------------------------------------
// Pack long scalars into a vector
class PackLNode : public PackNode {
public:
! PackLNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
! PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
+ //------------------------------Pack2LNode--------------------------------------
+ // Pack 2 long scalars into a vector
+ class Pack2LNode : public PackNode {
+ public:
+ Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
+ virtual int Opcode() const;
+ };
+
//------------------------------PackFNode---------------------------------------
// Pack float scalars into vector
class PackFNode : public PackNode {
public:
PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
*** 1010,1063 ****
};
//------------------------------PackFNode---------------------------------------
// Pack float scalars into vector
class PackFNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_FLOAT; }
public:
! PackFNode(Node* in1) : PackNode(in1) {}
! PackFNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
virtual int Opcode() const;
};
//------------------------------PackDNode---------------------------------------
// Pack double scalars into a vector
class PackDNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_DOUBLE; }
public:
! PackDNode(Node* in1) : PackNode(in1) {}
! PackDNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
virtual int Opcode() const;
};
! // The Pack2xN nodes assist code generation. They are created from
! // Pack4C, etc. nodes in final_graph_reshape in the form of a
! // balanced, binary tree.
!
! //------------------------------Pack2x1BNode-----------------------------------------
! // Pack 2 1-byte integers into vector of 2 bytes
! class Pack2x1BNode : public PackNode {
! protected:
! virtual BasicType elt_basic_type() const { return T_BYTE; }
public:
! Pack2x1BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
virtual int Opcode() const;
- virtual uint ideal_reg() const { return Op_RegI; }
};
- //------------------------------Pack2x2BNode---------------------------------------
- // Pack 2 2-byte integers into vector of 4 bytes
- class Pack2x2BNode : public PackNode {
- protected:
- virtual BasicType elt_basic_type() const { return T_CHAR; }
- public:
- Pack2x2BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
- virtual int Opcode() const;
- virtual uint ideal_reg() const { return Op_RegI; }
- };
//========================Extract_Scalar_from_Vector===============================
//------------------------------ExtractNode---------------------------------------
// Extract a scalar from a vector at position "pos"
--- 475,507 ----
};
//------------------------------PackFNode---------------------------------------
// Pack float scalars into vector
class PackFNode : public PackNode {
public:
! PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
! PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
//------------------------------PackDNode---------------------------------------
// Pack double scalars into a vector
class PackDNode : public PackNode {
public:
! PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
! PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
! //------------------------------Pack2DNode--------------------------------------
! // Pack 2 double scalars into a vector
! class Pack2DNode : public PackNode {
public:
! Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
virtual int Opcode() const;
};
//========================Extract_Scalar_from_Vector===============================
//------------------------------ExtractNode---------------------------------------
// Extract a scalar from a vector at position "pos"
*** 1067,1077 ****
assert(in(2)->get_int() >= 0, "positive constants");
}
virtual int Opcode() const;
uint pos() const { return in(2)->get_int(); }
! static Node* make(Compile* C, Node* v, uint position, const Type* opd_t);
};
//------------------------------ExtractBNode---------------------------------------
// Extract a byte from a vector at position "pos"
class ExtractBNode : public ExtractNode {
--- 511,521 ----
assert(in(2)->get_int() >= 0, "positive constants");
}
virtual int Opcode() const;
uint pos() const { return in(2)->get_int(); }
! static Node* make(Compile* C, Node* v, uint position, BasicType bt);
};
//------------------------------ExtractBNode---------------------------------------
// Extract a byte from a vector at position "pos"
class ExtractBNode : public ExtractNode {
src/share/vm/opto/vectornode.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File