< prev index next >

src/hotspot/share/opto/node.hpp

Print this page

  64 class CatchNode;
  65 class CatchProjNode;
  66 class CheckCastPPNode;
  67 class ClearArrayNode;
  68 class CmpNode;
  69 class CodeBuffer;
  70 class ConstraintCastNode;
  71 class ConNode;
  72 class CompareAndSwapNode;
  73 class CompareAndExchangeNode;
  74 class CountedLoopNode;
  75 class CountedLoopEndNode;
  76 class DecodeNarrowPtrNode;
  77 class DecodeNNode;
  78 class DecodeNKlassNode;
  79 class EncodeNarrowPtrNode;
  80 class EncodePNode;
  81 class EncodePKlassNode;
  82 class FastLockNode;
  83 class FastUnlockNode;

  84 class HaltNode;
  85 class IfNode;
  86 class IfProjNode;
  87 class IfFalseNode;
  88 class IfTrueNode;
  89 class InitializeNode;
  90 class JVMState;
  91 class JumpNode;
  92 class JumpProjNode;
  93 class LoadNode;
  94 class LoadStoreNode;
  95 class LoadStoreConditionalNode;
  96 class LockNode;
  97 class LongCountedLoopNode;
  98 class LongCountedLoopEndNode;
  99 class LoopNode;
 100 class LShiftNode;
 101 class MachBranchNode;
 102 class MachCallDynamicJavaNode;
 103 class MachCallJavaNode;
 104 class MachCallLeafNode;
 105 class MachCallNode;
 106 class MachCallRuntimeNode;
 107 class MachCallStaticJavaNode;
 108 class MachConstantBaseNode;
 109 class MachConstantNode;
 110 class MachGotoNode;
 111 class MachIfNode;
 112 class MachJumpNode;
 113 class MachNode;
 114 class MachNullCheckNode;
 115 class MachProjNode;

 116 class MachReturnNode;
 117 class MachSafePointNode;
 118 class MachSpillCopyNode;
 119 class MachTempNode;
 120 class MachMergeNode;
 121 class MachMemBarNode;

 122 class Matcher;
 123 class MemBarNode;
 124 class MemBarStoreStoreNode;
 125 class MemNode;
 126 class MergeMemNode;
 127 class MoveNode;
 128 class MulNode;
 129 class MultiNode;
 130 class MultiBranchNode;
 131 class NeverBranchNode;
 132 class Opaque1Node;
 133 class OuterStripMinedLoopNode;
 134 class OuterStripMinedLoopEndNode;
 135 class Node;
 136 class Node_Array;
 137 class Node_List;
 138 class Node_Stack;
 139 class OopMap;
 140 class ParmNode;
 141 class PCTableNode;

 146 class PhaseTransform;
 147 class PhaseValues;
 148 class PhiNode;
 149 class Pipeline;
 150 class PopulateIndexNode;
 151 class ProjNode;
 152 class RangeCheckNode;
 153 class RegMask;
 154 class RegionNode;
 155 class RootNode;
 156 class SafePointNode;
 157 class SafePointScalarObjectNode;
 158 class StartNode;
 159 class State;
 160 class StoreNode;
 161 class SubNode;
 162 class SubTypeCheckNode;
 163 class Type;
 164 class TypeNode;
 165 class UnlockNode;



 166 class VectorNode;
 167 class LoadVectorNode;
 168 class LoadVectorMaskedNode;
 169 class StoreVectorMaskedNode;
 170 class LoadVectorGatherNode;
 171 class StoreVectorNode;
 172 class StoreVectorScatterNode;
 173 class VectorMaskCmpNode;
 174 class VectorUnboxNode;
 175 class VectorSet;
 176 class VectorReinterpretNode;
 177 class ShiftVNode;
 178 class ExpandVNode;
 179 class CompressVNode;
 180 class CompressMNode;
 181 
 182 
 183 #ifndef OPTO_DU_ITERATOR_ASSERT
 184 #ifdef ASSERT
 185 #define OPTO_DU_ITERATOR_ASSERT 1

 647             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 648           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 649             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 650             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 651           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 652       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 653         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 654           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 655           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 656         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 657           DEFINE_CLASS_ID(BaseCountedLoopEnd,     If, 0)
 658             DEFINE_CLASS_ID(CountedLoopEnd,       BaseCountedLoopEnd, 0)
 659             DEFINE_CLASS_ID(LongCountedLoopEnd,   BaseCountedLoopEnd, 1)
 660           DEFINE_CLASS_ID(RangeCheck,             If, 1)
 661           DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
 662         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 663       DEFINE_CLASS_ID(Start,       Multi, 2)
 664       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 665         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 666         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)

 667 
 668     DEFINE_CLASS_ID(Mach,  Node, 1)
 669       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 670         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 671           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 672             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 673               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 674               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 675             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 676               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 677       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 678         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 679         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 680         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 681       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 682       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 683       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 684       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 685         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 686       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 687       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)


 688 
 689     DEFINE_CLASS_ID(Type,  Node, 2)
 690       DEFINE_CLASS_ID(Phi,   Type, 0)
 691       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 692         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 693         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 694         DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
 695         DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
 696         DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
 697         DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
 698       DEFINE_CLASS_ID(CMove, Type, 3)
 699       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 700       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 701         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 702         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 703       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 704         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 705         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 706       DEFINE_CLASS_ID(Vector, Type, 7)
 707         DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
 708         DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
 709         DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
 710         DEFINE_CLASS_ID(ShiftV, Vector, 3)
 711         DEFINE_CLASS_ID(CompressV, Vector, 4)
 712         DEFINE_CLASS_ID(ExpandV, Vector, 5)
 713         DEFINE_CLASS_ID(CompressM, Vector, 6)



 714 
 715     DEFINE_CLASS_ID(Proj,  Node, 3)
 716       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 717       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 718       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 719         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 720         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 721       DEFINE_CLASS_ID(Parm,      Proj, 4)
 722       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 723 
 724     DEFINE_CLASS_ID(Mem, Node, 4)
 725       DEFINE_CLASS_ID(Load, Mem, 0)
 726         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 727           DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
 728           DEFINE_CLASS_ID(LoadVectorGatherMasked, LoadVector, 1)
 729           DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 2)
 730       DEFINE_CLASS_ID(Store, Mem, 1)
 731         DEFINE_CLASS_ID(StoreVector, Store, 0)
 732           DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
 733           DEFINE_CLASS_ID(StoreVectorScatterMasked, StoreVector, 1)
 734           DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 2)
 735       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 736         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 737           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 738         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 739 
 740     DEFINE_CLASS_ID(Region, Node, 5)
 741       DEFINE_CLASS_ID(Loop, Region, 0)
 742         DEFINE_CLASS_ID(Root,                Loop, 0)
 743         DEFINE_CLASS_ID(BaseCountedLoop,     Loop, 1)
 744           DEFINE_CLASS_ID(CountedLoop,       BaseCountedLoop, 0)
 745           DEFINE_CLASS_ID(LongCountedLoop,   BaseCountedLoop, 1)
 746         DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
 747 
 748     DEFINE_CLASS_ID(Sub,   Node, 6)
 749       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 750         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 751         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 752         DEFINE_CLASS_ID(SubTypeCheck,Cmp, 2)

 753 
 754     DEFINE_CLASS_ID(MergeMem, Node, 7)
 755     DEFINE_CLASS_ID(Bool,     Node, 8)
 756     DEFINE_CLASS_ID(AddP,     Node, 9)
 757     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 758     DEFINE_CLASS_ID(Add,      Node, 11)
 759     DEFINE_CLASS_ID(Mul,      Node, 12)
 760     DEFINE_CLASS_ID(ClearArray, Node, 14)
 761     DEFINE_CLASS_ID(Halt,     Node, 15)
 762     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 763     DEFINE_CLASS_ID(Move,     Node, 17)
 764     DEFINE_CLASS_ID(LShift,   Node, 18)
 765 
 766     _max_classes  = ClassMask_Move
 767   };
 768   #undef DEFINE_CLASS_ID
 769 
 770   // Flags are sorted by usage frequency.
 771   enum NodeFlags {
 772     Flag_is_Copy                     = 1 << 0, // should be first bit to avoid shift

 831   #define DEFINE_CLASS_QUERY(type)                           \
 832   bool is_##type() const {                                   \
 833     return ((_class_id & ClassMask_##type) == Class_##type); \
 834   }                                                          \
 835   type##Node *as_##type() const {                            \
 836     assert(is_##type(), "invalid node class: %s", Name()); \
 837     return (type##Node*)this;                                \
 838   }                                                          \
 839   type##Node* isa_##type() const {                           \
 840     return (is_##type()) ? as_##type() : NULL;               \
 841   }
 842 
 843   DEFINE_CLASS_QUERY(AbstractLock)
 844   DEFINE_CLASS_QUERY(Add)
 845   DEFINE_CLASS_QUERY(AddP)
 846   DEFINE_CLASS_QUERY(Allocate)
 847   DEFINE_CLASS_QUERY(AllocateArray)
 848   DEFINE_CLASS_QUERY(ArrayCopy)
 849   DEFINE_CLASS_QUERY(BaseCountedLoop)
 850   DEFINE_CLASS_QUERY(BaseCountedLoopEnd)

 851   DEFINE_CLASS_QUERY(Bool)
 852   DEFINE_CLASS_QUERY(BoxLock)
 853   DEFINE_CLASS_QUERY(Call)
 854   DEFINE_CLASS_QUERY(CallDynamicJava)
 855   DEFINE_CLASS_QUERY(CallJava)
 856   DEFINE_CLASS_QUERY(CallLeaf)
 857   DEFINE_CLASS_QUERY(CallLeafNoFP)
 858   DEFINE_CLASS_QUERY(CallRuntime)
 859   DEFINE_CLASS_QUERY(CallStaticJava)
 860   DEFINE_CLASS_QUERY(Catch)
 861   DEFINE_CLASS_QUERY(CatchProj)
 862   DEFINE_CLASS_QUERY(CheckCastPP)
 863   DEFINE_CLASS_QUERY(CastII)
 864   DEFINE_CLASS_QUERY(CastLL)
 865   DEFINE_CLASS_QUERY(ConstraintCast)
 866   DEFINE_CLASS_QUERY(ClearArray)
 867   DEFINE_CLASS_QUERY(CMove)
 868   DEFINE_CLASS_QUERY(Cmp)
 869   DEFINE_CLASS_QUERY(CountedLoop)
 870   DEFINE_CLASS_QUERY(CountedLoopEnd)
 871   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 872   DEFINE_CLASS_QUERY(DecodeN)
 873   DEFINE_CLASS_QUERY(DecodeNKlass)
 874   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 875   DEFINE_CLASS_QUERY(EncodeP)
 876   DEFINE_CLASS_QUERY(EncodePKlass)
 877   DEFINE_CLASS_QUERY(FastLock)
 878   DEFINE_CLASS_QUERY(FastUnlock)

 879   DEFINE_CLASS_QUERY(Halt)
 880   DEFINE_CLASS_QUERY(If)
 881   DEFINE_CLASS_QUERY(RangeCheck)
 882   DEFINE_CLASS_QUERY(IfProj)
 883   DEFINE_CLASS_QUERY(IfFalse)
 884   DEFINE_CLASS_QUERY(IfTrue)
 885   DEFINE_CLASS_QUERY(Initialize)
 886   DEFINE_CLASS_QUERY(Jump)
 887   DEFINE_CLASS_QUERY(JumpProj)
 888   DEFINE_CLASS_QUERY(LongCountedLoop)
 889   DEFINE_CLASS_QUERY(LongCountedLoopEnd)
 890   DEFINE_CLASS_QUERY(Load)
 891   DEFINE_CLASS_QUERY(LoadStore)
 892   DEFINE_CLASS_QUERY(LoadStoreConditional)
 893   DEFINE_CLASS_QUERY(Lock)
 894   DEFINE_CLASS_QUERY(Loop)
 895   DEFINE_CLASS_QUERY(LShift)
 896   DEFINE_CLASS_QUERY(Mach)
 897   DEFINE_CLASS_QUERY(MachBranch)
 898   DEFINE_CLASS_QUERY(MachCall)
 899   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 900   DEFINE_CLASS_QUERY(MachCallJava)
 901   DEFINE_CLASS_QUERY(MachCallLeaf)
 902   DEFINE_CLASS_QUERY(MachCallRuntime)
 903   DEFINE_CLASS_QUERY(MachCallStaticJava)
 904   DEFINE_CLASS_QUERY(MachConstantBase)
 905   DEFINE_CLASS_QUERY(MachConstant)
 906   DEFINE_CLASS_QUERY(MachGoto)
 907   DEFINE_CLASS_QUERY(MachIf)
 908   DEFINE_CLASS_QUERY(MachJump)
 909   DEFINE_CLASS_QUERY(MachNullCheck)
 910   DEFINE_CLASS_QUERY(MachProj)

 911   DEFINE_CLASS_QUERY(MachReturn)
 912   DEFINE_CLASS_QUERY(MachSafePoint)
 913   DEFINE_CLASS_QUERY(MachSpillCopy)
 914   DEFINE_CLASS_QUERY(MachTemp)
 915   DEFINE_CLASS_QUERY(MachMemBar)
 916   DEFINE_CLASS_QUERY(MachMerge)

 917   DEFINE_CLASS_QUERY(Mem)
 918   DEFINE_CLASS_QUERY(MemBar)
 919   DEFINE_CLASS_QUERY(MemBarStoreStore)
 920   DEFINE_CLASS_QUERY(MergeMem)
 921   DEFINE_CLASS_QUERY(Move)
 922   DEFINE_CLASS_QUERY(Mul)
 923   DEFINE_CLASS_QUERY(Multi)
 924   DEFINE_CLASS_QUERY(MultiBranch)
 925   DEFINE_CLASS_QUERY(Opaque1)
 926   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
 927   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
 928   DEFINE_CLASS_QUERY(Parm)
 929   DEFINE_CLASS_QUERY(PCTable)
 930   DEFINE_CLASS_QUERY(Phi)
 931   DEFINE_CLASS_QUERY(Proj)
 932   DEFINE_CLASS_QUERY(Region)
 933   DEFINE_CLASS_QUERY(Root)
 934   DEFINE_CLASS_QUERY(SafePoint)
 935   DEFINE_CLASS_QUERY(SafePointScalarObject)
 936   DEFINE_CLASS_QUERY(Start)
 937   DEFINE_CLASS_QUERY(Store)
 938   DEFINE_CLASS_QUERY(Sub)
 939   DEFINE_CLASS_QUERY(SubTypeCheck)
 940   DEFINE_CLASS_QUERY(Type)



 941   DEFINE_CLASS_QUERY(Vector)
 942   DEFINE_CLASS_QUERY(VectorMaskCmp)
 943   DEFINE_CLASS_QUERY(VectorUnbox)
 944   DEFINE_CLASS_QUERY(VectorReinterpret)
 945   DEFINE_CLASS_QUERY(CompressV)
 946   DEFINE_CLASS_QUERY(ExpandV)
 947   DEFINE_CLASS_QUERY(CompressM)
 948   DEFINE_CLASS_QUERY(LoadVector)
 949   DEFINE_CLASS_QUERY(LoadVectorGather)
 950   DEFINE_CLASS_QUERY(StoreVector)
 951   DEFINE_CLASS_QUERY(StoreVectorScatter)
 952   DEFINE_CLASS_QUERY(ShiftV)
 953   DEFINE_CLASS_QUERY(Unlock)
 954 
 955   #undef DEFINE_CLASS_QUERY
 956 
 957   // duplicate of is_MachSpillCopy()
 958   bool is_SpillCopy () const {
 959     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 960   }

  64 class CatchNode;
  65 class CatchProjNode;
  66 class CheckCastPPNode;
  67 class ClearArrayNode;
  68 class CmpNode;
  69 class CodeBuffer;
  70 class ConstraintCastNode;
  71 class ConNode;
  72 class CompareAndSwapNode;
  73 class CompareAndExchangeNode;
  74 class CountedLoopNode;
  75 class CountedLoopEndNode;
  76 class DecodeNarrowPtrNode;
  77 class DecodeNNode;
  78 class DecodeNKlassNode;
  79 class EncodeNarrowPtrNode;
  80 class EncodePNode;
  81 class EncodePKlassNode;
  82 class FastLockNode;
  83 class FastUnlockNode;
  84 class FlatArrayCheckNode;
  85 class HaltNode;
  86 class IfNode;
  87 class IfProjNode;
  88 class IfFalseNode;
  89 class IfTrueNode;
  90 class InitializeNode;
  91 class JVMState;
  92 class JumpNode;
  93 class JumpProjNode;
  94 class LoadNode;
  95 class LoadStoreNode;
  96 class LoadStoreConditionalNode;
  97 class LockNode;
  98 class LongCountedLoopNode;
  99 class LongCountedLoopEndNode;
 100 class LoopNode;
 101 class LShiftNode;
 102 class MachBranchNode;
 103 class MachCallDynamicJavaNode;
 104 class MachCallJavaNode;
 105 class MachCallLeafNode;
 106 class MachCallNode;
 107 class MachCallRuntimeNode;
 108 class MachCallStaticJavaNode;
 109 class MachConstantBaseNode;
 110 class MachConstantNode;
 111 class MachGotoNode;
 112 class MachIfNode;
 113 class MachJumpNode;
 114 class MachNode;
 115 class MachNullCheckNode;
 116 class MachProjNode;
 117 class MachPrologNode;
 118 class MachReturnNode;
 119 class MachSafePointNode;
 120 class MachSpillCopyNode;
 121 class MachTempNode;
 122 class MachMergeNode;
 123 class MachMemBarNode;
 124 class MachVEPNode;
 125 class Matcher;
 126 class MemBarNode;
 127 class MemBarStoreStoreNode;
 128 class MemNode;
 129 class MergeMemNode;
 130 class MoveNode;
 131 class MulNode;
 132 class MultiNode;
 133 class MultiBranchNode;
 134 class NeverBranchNode;
 135 class Opaque1Node;
 136 class OuterStripMinedLoopNode;
 137 class OuterStripMinedLoopEndNode;
 138 class Node;
 139 class Node_Array;
 140 class Node_List;
 141 class Node_Stack;
 142 class OopMap;
 143 class ParmNode;
 144 class PCTableNode;

 149 class PhaseTransform;
 150 class PhaseValues;
 151 class PhiNode;
 152 class Pipeline;
 153 class PopulateIndexNode;
 154 class ProjNode;
 155 class RangeCheckNode;
 156 class RegMask;
 157 class RegionNode;
 158 class RootNode;
 159 class SafePointNode;
 160 class SafePointScalarObjectNode;
 161 class StartNode;
 162 class State;
 163 class StoreNode;
 164 class SubNode;
 165 class SubTypeCheckNode;
 166 class Type;
 167 class TypeNode;
 168 class UnlockNode;
 169 class InlineTypeBaseNode;
 170 class InlineTypeNode;
 171 class InlineTypePtrNode;
 172 class VectorNode;
 173 class LoadVectorNode;
 174 class LoadVectorMaskedNode;
 175 class StoreVectorMaskedNode;
 176 class LoadVectorGatherNode;
 177 class StoreVectorNode;
 178 class StoreVectorScatterNode;
 179 class VectorMaskCmpNode;
 180 class VectorUnboxNode;
 181 class VectorSet;
 182 class VectorReinterpretNode;
 183 class ShiftVNode;
 184 class ExpandVNode;
 185 class CompressVNode;
 186 class CompressMNode;
 187 
 188 
 189 #ifndef OPTO_DU_ITERATOR_ASSERT
 190 #ifdef ASSERT
 191 #define OPTO_DU_ITERATOR_ASSERT 1

 653             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 654           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 655             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 656             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 657           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 658       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 659         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 660           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 661           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 662         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 663           DEFINE_CLASS_ID(BaseCountedLoopEnd,     If, 0)
 664             DEFINE_CLASS_ID(CountedLoopEnd,       BaseCountedLoopEnd, 0)
 665             DEFINE_CLASS_ID(LongCountedLoopEnd,   BaseCountedLoopEnd, 1)
 666           DEFINE_CLASS_ID(RangeCheck,             If, 1)
 667           DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
 668         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 669       DEFINE_CLASS_ID(Start,       Multi, 2)
 670       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 671         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 672         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 673         DEFINE_CLASS_ID(Blackhole,        MemBar, 2)
 674 
 675     DEFINE_CLASS_ID(Mach,  Node, 1)
 676       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 677         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 678           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 679             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 680               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 681               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 682             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 683               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 684       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 685         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 686         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 687         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 688       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 689       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 690       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 691       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 692         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 693       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 694       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 695       DEFINE_CLASS_ID(MachProlog,       Mach, 8)
 696       DEFINE_CLASS_ID(MachVEP,          Mach, 9)
 697 
 698     DEFINE_CLASS_ID(Type,  Node, 2)
 699       DEFINE_CLASS_ID(Phi,   Type, 0)
 700       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 701         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 702         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 703         DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
 704         DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
 705         DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
 706         DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
 707       DEFINE_CLASS_ID(CMove, Type, 3)
 708       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 709       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 710         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 711         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 712       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 713         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 714         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 715       DEFINE_CLASS_ID(Vector, Type, 7)
 716         DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
 717         DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
 718         DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
 719         DEFINE_CLASS_ID(ShiftV, Vector, 3)
 720         DEFINE_CLASS_ID(CompressV, Vector, 4)
 721         DEFINE_CLASS_ID(ExpandV, Vector, 5)
 722         DEFINE_CLASS_ID(CompressM, Vector, 6)
 723       DEFINE_CLASS_ID(InlineTypeBase, Type, 8)
 724         DEFINE_CLASS_ID(InlineType, InlineTypeBase, 0)
 725         DEFINE_CLASS_ID(InlineTypePtr, InlineTypeBase, 1)
 726 
 727     DEFINE_CLASS_ID(Proj,  Node, 3)
 728       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 729       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 730       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 731         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 732         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 733       DEFINE_CLASS_ID(Parm,      Proj, 4)
 734       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 735 
 736     DEFINE_CLASS_ID(Mem, Node, 4)
 737       DEFINE_CLASS_ID(Load, Mem, 0)
 738         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 739           DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
 740           DEFINE_CLASS_ID(LoadVectorGatherMasked, LoadVector, 1)
 741           DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 2)
 742       DEFINE_CLASS_ID(Store, Mem, 1)
 743         DEFINE_CLASS_ID(StoreVector, Store, 0)
 744           DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
 745           DEFINE_CLASS_ID(StoreVectorScatterMasked, StoreVector, 1)
 746           DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 2)
 747       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 748         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 749           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 750         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 751 
 752     DEFINE_CLASS_ID(Region, Node, 5)
 753       DEFINE_CLASS_ID(Loop, Region, 0)
 754         DEFINE_CLASS_ID(Root,                Loop, 0)
 755         DEFINE_CLASS_ID(BaseCountedLoop,     Loop, 1)
 756           DEFINE_CLASS_ID(CountedLoop,       BaseCountedLoop, 0)
 757           DEFINE_CLASS_ID(LongCountedLoop,   BaseCountedLoop, 1)
 758         DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
 759 
 760     DEFINE_CLASS_ID(Sub,   Node, 6)
 761       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 762         DEFINE_CLASS_ID(FastLock,       Cmp, 0)
 763         DEFINE_CLASS_ID(FastUnlock,     Cmp, 1)
 764         DEFINE_CLASS_ID(SubTypeCheck,   Cmp, 2)
 765         DEFINE_CLASS_ID(FlatArrayCheck, Cmp, 3)
 766 
 767     DEFINE_CLASS_ID(MergeMem, Node, 7)
 768     DEFINE_CLASS_ID(Bool,     Node, 8)
 769     DEFINE_CLASS_ID(AddP,     Node, 9)
 770     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 771     DEFINE_CLASS_ID(Add,      Node, 11)
 772     DEFINE_CLASS_ID(Mul,      Node, 12)
 773     DEFINE_CLASS_ID(ClearArray, Node, 14)
 774     DEFINE_CLASS_ID(Halt,     Node, 15)
 775     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 776     DEFINE_CLASS_ID(Move,     Node, 17)
 777     DEFINE_CLASS_ID(LShift,   Node, 18)
 778 
 779     _max_classes  = ClassMask_Move
 780   };
 781   #undef DEFINE_CLASS_ID
 782 
 783   // Flags are sorted by usage frequency.
 784   enum NodeFlags {
 785     Flag_is_Copy                     = 1 << 0, // should be first bit to avoid shift

 844   #define DEFINE_CLASS_QUERY(type)                           \
 845   bool is_##type() const {                                   \
 846     return ((_class_id & ClassMask_##type) == Class_##type); \
 847   }                                                          \
 848   type##Node *as_##type() const {                            \
 849     assert(is_##type(), "invalid node class: %s", Name()); \
 850     return (type##Node*)this;                                \
 851   }                                                          \
 852   type##Node* isa_##type() const {                           \
 853     return (is_##type()) ? as_##type() : NULL;               \
 854   }
 855 
 856   DEFINE_CLASS_QUERY(AbstractLock)
 857   DEFINE_CLASS_QUERY(Add)
 858   DEFINE_CLASS_QUERY(AddP)
 859   DEFINE_CLASS_QUERY(Allocate)
 860   DEFINE_CLASS_QUERY(AllocateArray)
 861   DEFINE_CLASS_QUERY(ArrayCopy)
 862   DEFINE_CLASS_QUERY(BaseCountedLoop)
 863   DEFINE_CLASS_QUERY(BaseCountedLoopEnd)
 864   DEFINE_CLASS_QUERY(Blackhole)
 865   DEFINE_CLASS_QUERY(Bool)
 866   DEFINE_CLASS_QUERY(BoxLock)
 867   DEFINE_CLASS_QUERY(Call)
 868   DEFINE_CLASS_QUERY(CallDynamicJava)
 869   DEFINE_CLASS_QUERY(CallJava)
 870   DEFINE_CLASS_QUERY(CallLeaf)
 871   DEFINE_CLASS_QUERY(CallLeafNoFP)
 872   DEFINE_CLASS_QUERY(CallRuntime)
 873   DEFINE_CLASS_QUERY(CallStaticJava)
 874   DEFINE_CLASS_QUERY(Catch)
 875   DEFINE_CLASS_QUERY(CatchProj)
 876   DEFINE_CLASS_QUERY(CheckCastPP)
 877   DEFINE_CLASS_QUERY(CastII)
 878   DEFINE_CLASS_QUERY(CastLL)
 879   DEFINE_CLASS_QUERY(ConstraintCast)
 880   DEFINE_CLASS_QUERY(ClearArray)
 881   DEFINE_CLASS_QUERY(CMove)
 882   DEFINE_CLASS_QUERY(Cmp)
 883   DEFINE_CLASS_QUERY(CountedLoop)
 884   DEFINE_CLASS_QUERY(CountedLoopEnd)
 885   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 886   DEFINE_CLASS_QUERY(DecodeN)
 887   DEFINE_CLASS_QUERY(DecodeNKlass)
 888   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 889   DEFINE_CLASS_QUERY(EncodeP)
 890   DEFINE_CLASS_QUERY(EncodePKlass)
 891   DEFINE_CLASS_QUERY(FastLock)
 892   DEFINE_CLASS_QUERY(FastUnlock)
 893   DEFINE_CLASS_QUERY(FlatArrayCheck)
 894   DEFINE_CLASS_QUERY(Halt)
 895   DEFINE_CLASS_QUERY(If)
 896   DEFINE_CLASS_QUERY(RangeCheck)
 897   DEFINE_CLASS_QUERY(IfProj)
 898   DEFINE_CLASS_QUERY(IfFalse)
 899   DEFINE_CLASS_QUERY(IfTrue)
 900   DEFINE_CLASS_QUERY(Initialize)
 901   DEFINE_CLASS_QUERY(Jump)
 902   DEFINE_CLASS_QUERY(JumpProj)
 903   DEFINE_CLASS_QUERY(LongCountedLoop)
 904   DEFINE_CLASS_QUERY(LongCountedLoopEnd)
 905   DEFINE_CLASS_QUERY(Load)
 906   DEFINE_CLASS_QUERY(LoadStore)
 907   DEFINE_CLASS_QUERY(LoadStoreConditional)
 908   DEFINE_CLASS_QUERY(Lock)
 909   DEFINE_CLASS_QUERY(Loop)
 910   DEFINE_CLASS_QUERY(LShift)
 911   DEFINE_CLASS_QUERY(Mach)
 912   DEFINE_CLASS_QUERY(MachBranch)
 913   DEFINE_CLASS_QUERY(MachCall)
 914   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 915   DEFINE_CLASS_QUERY(MachCallJava)
 916   DEFINE_CLASS_QUERY(MachCallLeaf)
 917   DEFINE_CLASS_QUERY(MachCallRuntime)
 918   DEFINE_CLASS_QUERY(MachCallStaticJava)
 919   DEFINE_CLASS_QUERY(MachConstantBase)
 920   DEFINE_CLASS_QUERY(MachConstant)
 921   DEFINE_CLASS_QUERY(MachGoto)
 922   DEFINE_CLASS_QUERY(MachIf)
 923   DEFINE_CLASS_QUERY(MachJump)
 924   DEFINE_CLASS_QUERY(MachNullCheck)
 925   DEFINE_CLASS_QUERY(MachProj)
 926   DEFINE_CLASS_QUERY(MachProlog)
 927   DEFINE_CLASS_QUERY(MachReturn)
 928   DEFINE_CLASS_QUERY(MachSafePoint)
 929   DEFINE_CLASS_QUERY(MachSpillCopy)
 930   DEFINE_CLASS_QUERY(MachTemp)
 931   DEFINE_CLASS_QUERY(MachMemBar)
 932   DEFINE_CLASS_QUERY(MachMerge)
 933   DEFINE_CLASS_QUERY(MachVEP)
 934   DEFINE_CLASS_QUERY(Mem)
 935   DEFINE_CLASS_QUERY(MemBar)
 936   DEFINE_CLASS_QUERY(MemBarStoreStore)
 937   DEFINE_CLASS_QUERY(MergeMem)
 938   DEFINE_CLASS_QUERY(Move)
 939   DEFINE_CLASS_QUERY(Mul)
 940   DEFINE_CLASS_QUERY(Multi)
 941   DEFINE_CLASS_QUERY(MultiBranch)
 942   DEFINE_CLASS_QUERY(Opaque1)
 943   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
 944   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
 945   DEFINE_CLASS_QUERY(Parm)
 946   DEFINE_CLASS_QUERY(PCTable)
 947   DEFINE_CLASS_QUERY(Phi)
 948   DEFINE_CLASS_QUERY(Proj)
 949   DEFINE_CLASS_QUERY(Region)
 950   DEFINE_CLASS_QUERY(Root)
 951   DEFINE_CLASS_QUERY(SafePoint)
 952   DEFINE_CLASS_QUERY(SafePointScalarObject)
 953   DEFINE_CLASS_QUERY(Start)
 954   DEFINE_CLASS_QUERY(Store)
 955   DEFINE_CLASS_QUERY(Sub)
 956   DEFINE_CLASS_QUERY(SubTypeCheck)
 957   DEFINE_CLASS_QUERY(Type)
 958   DEFINE_CLASS_QUERY(InlineType)
 959   DEFINE_CLASS_QUERY(InlineTypeBase)
 960   DEFINE_CLASS_QUERY(InlineTypePtr)
 961   DEFINE_CLASS_QUERY(Vector)
 962   DEFINE_CLASS_QUERY(VectorMaskCmp)
 963   DEFINE_CLASS_QUERY(VectorUnbox)
 964   DEFINE_CLASS_QUERY(VectorReinterpret)
 965   DEFINE_CLASS_QUERY(CompressV)
 966   DEFINE_CLASS_QUERY(ExpandV)
 967   DEFINE_CLASS_QUERY(CompressM)
 968   DEFINE_CLASS_QUERY(LoadVector)
 969   DEFINE_CLASS_QUERY(LoadVectorGather)
 970   DEFINE_CLASS_QUERY(StoreVector)
 971   DEFINE_CLASS_QUERY(StoreVectorScatter)
 972   DEFINE_CLASS_QUERY(ShiftV)
 973   DEFINE_CLASS_QUERY(Unlock)
 974 
 975   #undef DEFINE_CLASS_QUERY
 976 
 977   // duplicate of is_MachSpillCopy()
 978   bool is_SpillCopy () const {
 979     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 980   }
< prev index next >