< prev index next >

src/share/vm/opto/node.hpp

Print this page




 125 class PhaseRegAlloc;
 126 class PhaseTransform;
 127 class PhaseValues;
 128 class PhiNode;
 129 class Pipeline;
 130 class ProjNode;
 131 class RangeCheckNode;
 132 class RegMask;
 133 class RegionNode;
 134 class RootNode;
 135 class SafePointNode;
 136 class SafePointScalarObjectNode;
 137 class StartNode;
 138 class State;
 139 class StoreNode;
 140 class SubNode;
 141 class Type;
 142 class TypeNode;
 143 class UnlockNode;
 144 class ValueTypeNode;

 145 class VectorNode;
 146 class LoadVectorNode;
 147 class StoreVectorNode;
 148 class VectorSet;
 149 typedef void (*NFunc)(Node&,void*);
 150 extern "C" {
 151   typedef int (*C_sort_func_t)(const void *, const void *);
 152 }
 153 
 154 // The type of all node counts and indexes.
 155 // It must hold at least 16 bits, but must also be fast to load and store.
 156 // This type, if less than 32 bits, could limit the number of possible nodes.
 157 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 158 typedef unsigned int node_idx_t;
 159 
 160 
 161 #ifndef OPTO_DU_ITERATOR_ASSERT
 162 #ifdef ASSERT
 163 #define OPTO_DU_ITERATOR_ASSERT 1
 164 #else


 647         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 648       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 649       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 650       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 651       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 652       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 653 
 654     DEFINE_CLASS_ID(Type,  Node, 2)
 655       DEFINE_CLASS_ID(Phi,   Type, 0)
 656       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 657         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 658         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 659       DEFINE_CLASS_ID(CMove, Type, 3)
 660       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 661       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 662         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 663         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 664       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 665         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 666         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 667       DEFINE_CLASS_ID(ValueType, Type, 7)


 668 
 669     DEFINE_CLASS_ID(Proj,  Node, 3)
 670       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 671       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 672       DEFINE_CLASS_ID(IfTrue,    Proj, 2)
 673       DEFINE_CLASS_ID(IfFalse,   Proj, 3)
 674       DEFINE_CLASS_ID(Parm,      Proj, 4)
 675       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 676 
 677     DEFINE_CLASS_ID(Mem,   Node, 4)
 678       DEFINE_CLASS_ID(Load,  Mem, 0)
 679         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 680       DEFINE_CLASS_ID(Store, Mem, 1)
 681         DEFINE_CLASS_ID(StoreVector, Store, 0)
 682       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 683         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 684           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 685         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 686 
 687     DEFINE_CLASS_ID(Region, Node, 5)


 839   DEFINE_CLASS_QUERY(Mem)
 840   DEFINE_CLASS_QUERY(MemBar)
 841   DEFINE_CLASS_QUERY(MemBarStoreStore)
 842   DEFINE_CLASS_QUERY(MergeMem)
 843   DEFINE_CLASS_QUERY(Mul)
 844   DEFINE_CLASS_QUERY(Multi)
 845   DEFINE_CLASS_QUERY(MultiBranch)
 846   DEFINE_CLASS_QUERY(Parm)
 847   DEFINE_CLASS_QUERY(PCTable)
 848   DEFINE_CLASS_QUERY(Phi)
 849   DEFINE_CLASS_QUERY(Proj)
 850   DEFINE_CLASS_QUERY(Region)
 851   DEFINE_CLASS_QUERY(Root)
 852   DEFINE_CLASS_QUERY(SafePoint)
 853   DEFINE_CLASS_QUERY(SafePointScalarObject)
 854   DEFINE_CLASS_QUERY(Start)
 855   DEFINE_CLASS_QUERY(Store)
 856   DEFINE_CLASS_QUERY(Sub)
 857   DEFINE_CLASS_QUERY(Type)
 858   DEFINE_CLASS_QUERY(ValueType)


 859   DEFINE_CLASS_QUERY(Vector)
 860   DEFINE_CLASS_QUERY(LoadVector)
 861   DEFINE_CLASS_QUERY(StoreVector)
 862   DEFINE_CLASS_QUERY(Unlock)
 863 
 864   #undef DEFINE_CLASS_QUERY
 865 
 866   // duplicate of is_MachSpillCopy()
 867   bool is_SpillCopy () const {
 868     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 869   }
 870 
 871   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 872   // The data node which is safe to leave in dead loop during IGVN optimization.
 873   bool is_dead_loop_safe() const {
 874     return is_Phi() || (is_Proj() && in(0) == NULL) ||
 875            ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
 876             (!is_Proj() || !in(0)->is_Allocate()));
 877   }
 878 




 125 class PhaseRegAlloc;
 126 class PhaseTransform;
 127 class PhaseValues;
 128 class PhiNode;
 129 class Pipeline;
 130 class ProjNode;
 131 class RangeCheckNode;
 132 class RegMask;
 133 class RegionNode;
 134 class RootNode;
 135 class SafePointNode;
 136 class SafePointScalarObjectNode;
 137 class StartNode;
 138 class State;
 139 class StoreNode;
 140 class SubNode;
 141 class Type;
 142 class TypeNode;
 143 class UnlockNode;
 144 class ValueTypeNode;
 145 class ValueTypeBaseNode;
 146 class VectorNode;
 147 class LoadVectorNode;
 148 class StoreVectorNode;
 149 class VectorSet;
 150 typedef void (*NFunc)(Node&,void*);
 151 extern "C" {
 152   typedef int (*C_sort_func_t)(const void *, const void *);
 153 }
 154 
 155 // The type of all node counts and indexes.
 156 // It must hold at least 16 bits, but must also be fast to load and store.
 157 // This type, if less than 32 bits, could limit the number of possible nodes.
 158 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 159 typedef unsigned int node_idx_t;
 160 
 161 
 162 #ifndef OPTO_DU_ITERATOR_ASSERT
 163 #ifdef ASSERT
 164 #define OPTO_DU_ITERATOR_ASSERT 1
 165 #else


 648         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 649       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 650       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 651       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 652       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 653       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 654 
 655     DEFINE_CLASS_ID(Type,  Node, 2)
 656       DEFINE_CLASS_ID(Phi,   Type, 0)
 657       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 658         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 659         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 660       DEFINE_CLASS_ID(CMove, Type, 3)
 661       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 662       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 663         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 664         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 665       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 666         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 667         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 668       DEFINE_CLASS_ID(ValueTypeBase, Type, 7)
 669         DEFINE_CLASS_ID(ValueType, ValueTypeBase, 0)
 670         DEFINE_CLASS_ID(ValueTypePtr, ValueTypeBase, 1)
 671 
 672     DEFINE_CLASS_ID(Proj,  Node, 3)
 673       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 674       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 675       DEFINE_CLASS_ID(IfTrue,    Proj, 2)
 676       DEFINE_CLASS_ID(IfFalse,   Proj, 3)
 677       DEFINE_CLASS_ID(Parm,      Proj, 4)
 678       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 679 
 680     DEFINE_CLASS_ID(Mem,   Node, 4)
 681       DEFINE_CLASS_ID(Load,  Mem, 0)
 682         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 683       DEFINE_CLASS_ID(Store, Mem, 1)
 684         DEFINE_CLASS_ID(StoreVector, Store, 0)
 685       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 686         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 687           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 688         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 689 
 690     DEFINE_CLASS_ID(Region, Node, 5)


 842   DEFINE_CLASS_QUERY(Mem)
 843   DEFINE_CLASS_QUERY(MemBar)
 844   DEFINE_CLASS_QUERY(MemBarStoreStore)
 845   DEFINE_CLASS_QUERY(MergeMem)
 846   DEFINE_CLASS_QUERY(Mul)
 847   DEFINE_CLASS_QUERY(Multi)
 848   DEFINE_CLASS_QUERY(MultiBranch)
 849   DEFINE_CLASS_QUERY(Parm)
 850   DEFINE_CLASS_QUERY(PCTable)
 851   DEFINE_CLASS_QUERY(Phi)
 852   DEFINE_CLASS_QUERY(Proj)
 853   DEFINE_CLASS_QUERY(Region)
 854   DEFINE_CLASS_QUERY(Root)
 855   DEFINE_CLASS_QUERY(SafePoint)
 856   DEFINE_CLASS_QUERY(SafePointScalarObject)
 857   DEFINE_CLASS_QUERY(Start)
 858   DEFINE_CLASS_QUERY(Store)
 859   DEFINE_CLASS_QUERY(Sub)
 860   DEFINE_CLASS_QUERY(Type)
 861   DEFINE_CLASS_QUERY(ValueType)
 862   DEFINE_CLASS_QUERY(ValueTypeBase)
 863   DEFINE_CLASS_QUERY(ValueTypePtr)
 864   DEFINE_CLASS_QUERY(Vector)
 865   DEFINE_CLASS_QUERY(LoadVector)
 866   DEFINE_CLASS_QUERY(StoreVector)
 867   DEFINE_CLASS_QUERY(Unlock)
 868 
 869   #undef DEFINE_CLASS_QUERY
 870 
 871   // duplicate of is_MachSpillCopy()
 872   bool is_SpillCopy () const {
 873     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 874   }
 875 
 876   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 877   // The data node which is safe to leave in dead loop during IGVN optimization.
 878   bool is_dead_loop_safe() const {
 879     return is_Phi() || (is_Proj() && in(0) == NULL) ||
 880            ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
 881             (!is_Proj() || !in(0)->is_Allocate()));
 882   }
 883 


< prev index next >