< prev index next >

src/share/vm/opto/type.cpp

Print this page

        

*** 48,109 **** // Dictionary of types shared among compilations. Dict* Type::_shared_type_dict = NULL; // Array which maps compiler types to Basic Types Type::TypeInfo Type::_type_info[Type::lastype] = { ! { Bad, T_ILLEGAL, "bad", false, Node::NotAMachineReg, relocInfo::none }, // Bad ! { Control, T_ILLEGAL, "control", false, 0, relocInfo::none }, // Control ! { Bottom, T_VOID, "top", false, 0, relocInfo::none }, // Top ! { Bad, T_INT, "int:", false, Op_RegI, relocInfo::none }, // Int ! { Bad, T_LONG, "long:", false, Op_RegL, relocInfo::none }, // Long ! { Half, T_VOID, "half", false, 0, relocInfo::none }, // Half ! { Bad, T_NARROWOOP, "narrowoop:", false, Op_RegN, relocInfo::none }, // NarrowOop ! { Bad, T_NARROWKLASS,"narrowklass:", false, Op_RegN, relocInfo::none }, // NarrowKlass ! { Bad, T_ILLEGAL, "tuple:", false, Node::NotAMachineReg, relocInfo::none }, // Tuple ! { Bad, T_ARRAY, "array:", false, Node::NotAMachineReg, relocInfo::none }, // Array #ifdef SPARC ! { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Op_RegD, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, 0, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ #elif defined(PPC64) ! { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, 0, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ #else // all other ! { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ #endif ! { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr ! { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::none }, // RawPtr ! { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr ! { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr ! { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr ! { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr ! { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr ! { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function ! { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio ! { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address ! { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory ! { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop ! { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon ! { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot ! { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop ! { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon ! { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot ! { Top, T_ILLEGAL, "bottom", false, 0, relocInfo::none } // Bottom }; // Map ideal registers (machine types) to ideal types ! const Type *Type::mreg2type[_last_machine_leaf]; // Map basic types to canonical Type* pointers. const Type* Type:: _const_basic_type[T_CONFLICT+1]; // Map basic types to constant-zero Types. --- 48,109 ---- // Dictionary of types shared among compilations. Dict* Type::_shared_type_dict = NULL; // Array which maps compiler types to Basic Types Type::TypeInfo Type::_type_info[Type::lastype] = { ! { Bad, T_ILLEGAL, "bad", false, Opcodes::NotAMachineReg, relocInfo::none }, // Bad ! { Control, T_ILLEGAL, "control", false, Opcodes::Op_Node, relocInfo::none }, // Control ! { Bottom, T_VOID, "top", false, Opcodes::Op_Node, relocInfo::none }, // Top ! { Bad, T_INT, "int:", false, Opcodes::Op_RegI, relocInfo::none }, // Int ! { Bad, T_LONG, "long:", false, Opcodes::Op_RegL, relocInfo::none }, // Long ! { Half, T_VOID, "half", false, Opcodes::Op_Node, relocInfo::none }, // Half ! { Bad, T_NARROWOOP, "narrowoop:", false, Opcodes::Op_RegN, relocInfo::none }, // NarrowOop ! { Bad, T_NARROWKLASS,"narrowklass:", false, Opcodes::Op_RegN, relocInfo::none }, // NarrowKlass ! { Bad, T_ILLEGAL, "tuple:", false, Opcodes::NotAMachineReg, relocInfo::none }, // Tuple ! { Bad, T_ARRAY, "array:", false, Opcodes::NotAMachineReg, relocInfo::none }, // Array #ifdef SPARC ! { Bad, T_ILLEGAL, "vectors:", false, Opcodes::Op_Node, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Opcodes::Op_RegD, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, Opcodes::Op_Node, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, Opcodes::Op_Node, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, Opcodes::Op_Node, relocInfo::none }, // VectorZ #elif defined(PPC64) ! { Bad, T_ILLEGAL, "vectors:", false, Opcodes::Op_Node, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Opcodes::Op_RegL, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, Opcodes::Op_Node, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, Opcodes::Op_Node, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, Opcodes::Op_Node, relocInfo::none }, // VectorZ #else // all other ! { Bad, T_ILLEGAL, "vectors:", false, Opcodes::Op_VecS, relocInfo::none }, // VectorS ! { Bad, T_ILLEGAL, "vectord:", false, Opcodes::Op_VecD, relocInfo::none }, // VectorD ! { Bad, T_ILLEGAL, "vectorx:", false, Opcodes::Op_VecX, relocInfo::none }, // VectorX ! { Bad, T_ILLEGAL, "vectory:", false, Opcodes::Op_VecY, relocInfo::none }, // VectorY ! { Bad, T_ILLEGAL, "vectorz:", false, Opcodes::Op_VecZ, relocInfo::none }, // VectorZ #endif ! { Bad, T_ADDRESS, "anyptr:", false, Opcodes::Op_RegP, relocInfo::none }, // AnyPtr ! { Bad, T_ADDRESS, "rawptr:", false, Opcodes::Op_RegP, relocInfo::none }, // RawPtr ! { Bad, T_OBJECT, "oop:", true, Opcodes::Op_RegP, relocInfo::oop_type }, // OopPtr ! { Bad, T_OBJECT, "inst:", true, Opcodes::Op_RegP, relocInfo::oop_type }, // InstPtr ! { Bad, T_OBJECT, "ary:", true, Opcodes::Op_RegP, relocInfo::oop_type }, // AryPtr ! { Bad, T_METADATA, "metadata:", false, Opcodes::Op_RegP, relocInfo::metadata_type }, // MetadataPtr ! { Bad, T_METADATA, "klass:", false, Opcodes::Op_RegP, relocInfo::metadata_type }, // KlassPtr ! { Bad, T_OBJECT, "func", false, Opcodes::Op_Node, relocInfo::none }, // Function ! { Abio, T_ILLEGAL, "abIO", false, Opcodes::Op_Node, relocInfo::none }, // Abio ! { Return_Address, T_ADDRESS, "return_address",false, Opcodes::Op_RegP, relocInfo::none }, // Return_Address ! { Memory, T_ILLEGAL, "memory", false, Opcodes::Op_Node, relocInfo::none }, // Memory ! { FloatBot, T_FLOAT, "float_top", false, Opcodes::Op_RegF, relocInfo::none }, // FloatTop ! { FloatCon, T_FLOAT, "ftcon:", false, Opcodes::Op_RegF, relocInfo::none }, // FloatCon ! { FloatTop, T_FLOAT, "float", false, Opcodes::Op_RegF, relocInfo::none }, // FloatBot ! { DoubleBot, T_DOUBLE, "double_top", false, Opcodes::Op_RegD, relocInfo::none }, // DoubleTop ! { DoubleCon, T_DOUBLE, "dblcon:", false, Opcodes::Op_RegD, relocInfo::none }, // DoubleCon ! { DoubleTop, T_DOUBLE, "double", false, Opcodes::Op_RegD, relocInfo::none }, // DoubleBot ! { Top, T_ILLEGAL, "bottom", false, Opcodes::Op_Node, relocInfo::none } // Bottom }; // Map ideal registers (machine types) to ideal types ! const Type *Type::mreg2type[static_cast<uint>(Opcodes::_last_machine_leaf)]; // Map basic types to canonical Type* pointers. const Type* Type:: _const_basic_type[T_CONFLICT+1]; // Map basic types to constant-zero Types.
*** 533,551 **** TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR ); TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM ); TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR ); ! mreg2type[Op_Node] = Type::BOTTOM; ! mreg2type[Op_Set ] = 0; ! mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM; ! mreg2type[Op_RegI] = TypeInt::INT; ! mreg2type[Op_RegP] = TypePtr::BOTTOM; ! mreg2type[Op_RegF] = Type::FLOAT; ! mreg2type[Op_RegD] = Type::DOUBLE; ! mreg2type[Op_RegL] = TypeLong::LONG; ! mreg2type[Op_RegFlags] = TypeInt::CC; TypeAryPtr::RANGE = TypeAryPtr::make( TypePtr::BotPTR, TypeAry::make(Type::BOTTOM,TypeInt::POS), NULL /* current->env()->Object_klass() */, false, arrayOopDesc::length_offset_in_bytes()); TypeAryPtr::NARROWOOPS = TypeAryPtr::make(TypePtr::BotPTR, TypeAry::make(TypeNarrowOop::BOTTOM, TypeInt::POS), NULL /*ciArrayKlass::make(o)*/, false, Type::OffsetBot); --- 533,551 ---- TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR ); TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM ); TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR ); ! mreg2type[static_cast<uint>(Opcodes::Op_Node)] = Type::BOTTOM; ! mreg2type[static_cast<uint>(Opcodes::Op_Set) ] = 0; ! mreg2type[static_cast<uint>(Opcodes::Op_RegN)] = TypeNarrowOop::BOTTOM; ! mreg2type[static_cast<uint>(Opcodes::Op_RegI)] = TypeInt::INT; ! mreg2type[static_cast<uint>(Opcodes::Op_RegP)] = TypePtr::BOTTOM; ! mreg2type[static_cast<uint>(Opcodes::Op_RegF)] = Type::FLOAT; ! mreg2type[static_cast<uint>(Opcodes::Op_RegD)] = Type::DOUBLE; ! mreg2type[static_cast<uint>(Opcodes::Op_RegL)] = TypeLong::LONG; ! mreg2type[static_cast<uint>(Opcodes::Op_RegFlags)] = TypeInt::CC; TypeAryPtr::RANGE = TypeAryPtr::make( TypePtr::BotPTR, TypeAry::make(Type::BOTTOM,TypeInt::POS), NULL /* current->env()->Object_klass() */, false, arrayOopDesc::length_offset_in_bytes()); TypeAryPtr::NARROWOOPS = TypeAryPtr::make(TypePtr::BotPTR, TypeAry::make(TypeNarrowOop::BOTTOM, TypeInt::POS), NULL /*ciArrayKlass::make(o)*/, false, Type::OffsetBot);
*** 656,670 **** TypeVect::VECTY = TypeVect::make(T_FLOAT,8); } if (Matcher::vector_size_supported(T_FLOAT,16)) { TypeVect::VECTZ = TypeVect::make(T_FLOAT,16); } ! mreg2type[Op_VecS] = TypeVect::VECTS; ! mreg2type[Op_VecD] = TypeVect::VECTD; ! mreg2type[Op_VecX] = TypeVect::VECTX; ! mreg2type[Op_VecY] = TypeVect::VECTY; ! mreg2type[Op_VecZ] = TypeVect::VECTZ; // Restore working type arena. current->set_type_arena(save); current->set_type_dict(NULL); } --- 656,670 ---- TypeVect::VECTY = TypeVect::make(T_FLOAT,8); } if (Matcher::vector_size_supported(T_FLOAT,16)) { TypeVect::VECTZ = TypeVect::make(T_FLOAT,16); } ! mreg2type[static_cast<uint>(Opcodes::Op_VecS)] = TypeVect::VECTS; ! mreg2type[static_cast<uint>(Opcodes::Op_VecD)] = TypeVect::VECTD; ! mreg2type[static_cast<uint>(Opcodes::Op_VecX)] = TypeVect::VECTX; ! mreg2type[static_cast<uint>(Opcodes::Op_VecY)] = TypeVect::VECTY; ! mreg2type[static_cast<uint>(Opcodes::Op_VecZ)] = TypeVect::VECTZ; // Restore working type arena. current->set_type_arena(save); current->set_type_dict(NULL); }
*** 2222,2242 **** assert(is_java_primitive(elem_bt), "only primitive types in vector"); assert(length > 1 && is_power_of_2(length), "vector length is power of 2"); assert(Matcher::vector_size_supported(elem_bt, length), "length in range"); int size = length * type2aelembytes(elem_bt); switch (Matcher::vector_ideal_reg(size)) { ! case Op_VecS: return (TypeVect*)(new TypeVectS(elem, length))->hashcons(); ! case Op_RegL: ! case Op_VecD: ! case Op_RegD: return (TypeVect*)(new TypeVectD(elem, length))->hashcons(); ! case Op_VecX: return (TypeVect*)(new TypeVectX(elem, length))->hashcons(); ! case Op_VecY: return (TypeVect*)(new TypeVectY(elem, length))->hashcons(); ! case Op_VecZ: return (TypeVect*)(new TypeVectZ(elem, length))->hashcons(); } ShouldNotReachHere(); return NULL; } --- 2222,2242 ---- assert(is_java_primitive(elem_bt), "only primitive types in vector"); assert(length > 1 && is_power_of_2(length), "vector length is power of 2"); assert(Matcher::vector_size_supported(elem_bt, length), "length in range"); int size = length * type2aelembytes(elem_bt); switch (Matcher::vector_ideal_reg(size)) { ! case Opcodes::Op_VecS: return (TypeVect*)(new TypeVectS(elem, length))->hashcons(); ! case Opcodes::Op_RegL: ! case Opcodes::Op_VecD: ! case Opcodes::Op_RegD: return (TypeVect*)(new TypeVectD(elem, length))->hashcons(); ! case Opcodes::Op_VecX: return (TypeVect*)(new TypeVectX(elem, length))->hashcons(); ! case Opcodes::Op_VecY: return (TypeVect*)(new TypeVectY(elem, length))->hashcons(); ! case Opcodes::Op_VecZ: return (TypeVect*)(new TypeVectZ(elem, length))->hashcons(); } ShouldNotReachHere(); return NULL; }
< prev index next >