28 #include "opto/compile.hpp" 29 #include "opto/connode.hpp" 30 #include "opto/machnode.hpp" 31 #include "opto/matcher.hpp" 32 #include "opto/memnode.hpp" 33 #include "opto/phaseX.hpp" 34 #include "opto/subnode.hpp" 35 #include "runtime/sharedRuntime.hpp" 36 37 // Optimization - Graph Style 38 39 //============================================================================= 40 //------------------------------hash------------------------------------------- 41 uint ConNode::hash() const { 42 return (uintptr_t)in(TypeFunc::Control) + _type->hash(); 43 } 44 45 //------------------------------make------------------------------------------- 46 ConNode *ConNode::make( Compile* C, const Type *t ) { 47 switch( t->basic_type() ) { 48 case T_INT: return new (C) ConINode( t->is_int() ); 49 case T_LONG: return new (C) ConLNode( t->is_long() ); 50 case T_FLOAT: return new (C) ConFNode( t->is_float_constant() ); 51 case T_DOUBLE: return new (C) ConDNode( t->is_double_constant() ); 52 case T_VOID: return new (C) ConNode ( Type::TOP ); 53 case T_OBJECT: return new (C) ConPNode( t->is_ptr() ); 54 case T_ARRAY: return new (C) ConPNode( t->is_aryptr() ); 55 case T_ADDRESS: return new (C) ConPNode( t->is_ptr() ); 56 case T_NARROWOOP: return new (C) ConNNode( t->is_narrowoop() ); 57 case T_NARROWKLASS: return new (C) ConNKlassNode( t->is_narrowklass() ); 58 case T_METADATA: return new (C) ConPNode( t->is_ptr() ); 59 // Expected cases: TypePtr::NULL_PTR, any is_rawptr() 60 // Also seen: AnyPtr(TopPTR *+top); from command line: 61 // r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660 62 // %%%% Stop using TypePtr::NULL_PTR to represent nulls: use either TypeRawPtr::NULL_PTR 63 // or else TypeOopPtr::NULL_PTR. Then set Type::_basic_type[AnyPtr] = T_ILLEGAL 64 } 65 ShouldNotReachHere(); 66 return NULL; 67 } 68 69 | 28 #include "opto/compile.hpp" 29 #include "opto/connode.hpp" 30 #include "opto/machnode.hpp" 31 #include "opto/matcher.hpp" 32 #include "opto/memnode.hpp" 33 #include "opto/phaseX.hpp" 34 #include "opto/subnode.hpp" 35 #include "runtime/sharedRuntime.hpp" 36 37 // Optimization - Graph Style 38 39 //============================================================================= 40 //------------------------------hash------------------------------------------- 41 uint ConNode::hash() const { 42 return (uintptr_t)in(TypeFunc::Control) + _type->hash(); 43 } 44 45 //------------------------------make------------------------------------------- 46 ConNode *ConNode::make( Compile* C, const Type *t ) { 47 switch( t->basic_type() ) { 48 case T_INT: return new ConINode( t->is_int() ); 49 case T_LONG: return new ConLNode( t->is_long() ); 50 case T_FLOAT: return new ConFNode( t->is_float_constant() ); 51 case T_DOUBLE: return new ConDNode( t->is_double_constant() ); 52 case T_VOID: return new ConNode ( Type::TOP ); 53 case T_OBJECT: return new ConPNode( t->is_ptr() ); 54 case T_ARRAY: return new ConPNode( t->is_aryptr() ); 55 case T_ADDRESS: return new ConPNode( t->is_ptr() ); 56 case T_NARROWOOP: return new ConNNode( t->is_narrowoop() ); 57 case T_NARROWKLASS: return new ConNKlassNode( t->is_narrowklass() ); 58 case T_METADATA: return new ConPNode( t->is_ptr() ); 59 // Expected cases: TypePtr::NULL_PTR, any is_rawptr() 60 // Also seen: AnyPtr(TopPTR *+top); from command line: 61 // r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660 62 // %%%% Stop using TypePtr::NULL_PTR to represent nulls: use either TypeRawPtr::NULL_PTR 63 // or else TypeOopPtr::NULL_PTR. Then set Type::_basic_type[AnyPtr] = T_ILLEGAL 64 } 65 ShouldNotReachHere(); 66 return NULL; 67 } 68 69 |