< prev index next >

src/hotspot/share/opto/node.hpp

Print this page

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

  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 MachBranchNode;
 102 class MachCallDynamicJavaNode;
 103 class MachCallJavaNode;
 104 class MachCallLeafNode;
 105 class MachCallNode;
 106 class MachCallNativeNode;
 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 MachReturnNode;
 118 class MachSafePointNode;
 119 class MachSpillCopyNode;
 120 class MachTempNode;
 121 class MachMergeNode;
 122 class MachMemBarNode;

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

 146 class PhaseRegAlloc;
 147 class PhaseTransform;
 148 class PhaseValues;
 149 class PhiNode;
 150 class Pipeline;
 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 VectorSet;
 175 
 176 // The type of all node counts and indexes.
 177 // It must hold at least 16 bits, but must also be fast to load and store.
 178 // This type, if less than 32 bits, could limit the number of possible nodes.
 179 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 180 typedef unsigned int node_idx_t;
 181 
 182 
 183 #ifndef OPTO_DU_ITERATOR_ASSERT
 184 #ifdef ASSERT
 185 #define OPTO_DU_ITERATOR_ASSERT 1

 647           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 648             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 649             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 650           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 651           DEFINE_CLASS_ID(CallNative,       Call, 5)
 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(MachCallNative,       MachCall, 2)
 678       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 679         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 680         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 681         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 682       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 683       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 684       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 685       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 686         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 687       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 688       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)


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



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

 746 
 747     DEFINE_CLASS_ID(MergeMem, Node, 7)
 748     DEFINE_CLASS_ID(Bool,     Node, 8)
 749     DEFINE_CLASS_ID(AddP,     Node, 9)
 750     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 751     DEFINE_CLASS_ID(Add,      Node, 11)
 752     DEFINE_CLASS_ID(Mul,      Node, 12)
 753     DEFINE_CLASS_ID(ClearArray, Node, 14)
 754     DEFINE_CLASS_ID(Halt,     Node, 15)
 755     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 756     DEFINE_CLASS_ID(Move,     Node, 17)
 757 
 758     _max_classes  = ClassMask_Move
 759   };
 760   #undef DEFINE_CLASS_ID
 761 
 762   // Flags are sorted by usage frequency.
 763   enum NodeFlags {
 764     Flag_is_Copy                     = 1 << 0, // should be first bit to avoid shift
 765     Flag_rematerialize               = 1 << 1,

 821   #define DEFINE_CLASS_QUERY(type)                           \
 822   bool is_##type() const {                                   \
 823     return ((_class_id & ClassMask_##type) == Class_##type); \
 824   }                                                          \
 825   type##Node *as_##type() const {                            \
 826     assert(is_##type(), "invalid node class: %s", Name()); \
 827     return (type##Node*)this;                                \
 828   }                                                          \
 829   type##Node* isa_##type() const {                           \
 830     return (is_##type()) ? as_##type() : NULL;               \
 831   }
 832 
 833   DEFINE_CLASS_QUERY(AbstractLock)
 834   DEFINE_CLASS_QUERY(Add)
 835   DEFINE_CLASS_QUERY(AddP)
 836   DEFINE_CLASS_QUERY(Allocate)
 837   DEFINE_CLASS_QUERY(AllocateArray)
 838   DEFINE_CLASS_QUERY(ArrayCopy)
 839   DEFINE_CLASS_QUERY(BaseCountedLoop)
 840   DEFINE_CLASS_QUERY(BaseCountedLoopEnd)

 841   DEFINE_CLASS_QUERY(Bool)
 842   DEFINE_CLASS_QUERY(BoxLock)
 843   DEFINE_CLASS_QUERY(Call)
 844   DEFINE_CLASS_QUERY(CallNative)
 845   DEFINE_CLASS_QUERY(CallDynamicJava)
 846   DEFINE_CLASS_QUERY(CallJava)
 847   DEFINE_CLASS_QUERY(CallLeaf)
 848   DEFINE_CLASS_QUERY(CallLeafNoFP)
 849   DEFINE_CLASS_QUERY(CallRuntime)
 850   DEFINE_CLASS_QUERY(CallStaticJava)
 851   DEFINE_CLASS_QUERY(Catch)
 852   DEFINE_CLASS_QUERY(CatchProj)
 853   DEFINE_CLASS_QUERY(CheckCastPP)
 854   DEFINE_CLASS_QUERY(CastII)
 855   DEFINE_CLASS_QUERY(CastLL)
 856   DEFINE_CLASS_QUERY(ConstraintCast)
 857   DEFINE_CLASS_QUERY(ClearArray)
 858   DEFINE_CLASS_QUERY(CMove)
 859   DEFINE_CLASS_QUERY(Cmp)
 860   DEFINE_CLASS_QUERY(CountedLoop)
 861   DEFINE_CLASS_QUERY(CountedLoopEnd)
 862   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 863   DEFINE_CLASS_QUERY(DecodeN)
 864   DEFINE_CLASS_QUERY(DecodeNKlass)
 865   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 866   DEFINE_CLASS_QUERY(EncodeP)
 867   DEFINE_CLASS_QUERY(EncodePKlass)
 868   DEFINE_CLASS_QUERY(FastLock)
 869   DEFINE_CLASS_QUERY(FastUnlock)

 870   DEFINE_CLASS_QUERY(Halt)
 871   DEFINE_CLASS_QUERY(If)
 872   DEFINE_CLASS_QUERY(RangeCheck)
 873   DEFINE_CLASS_QUERY(IfProj)
 874   DEFINE_CLASS_QUERY(IfFalse)
 875   DEFINE_CLASS_QUERY(IfTrue)
 876   DEFINE_CLASS_QUERY(Initialize)
 877   DEFINE_CLASS_QUERY(Jump)
 878   DEFINE_CLASS_QUERY(JumpProj)
 879   DEFINE_CLASS_QUERY(LongCountedLoop)
 880   DEFINE_CLASS_QUERY(LongCountedLoopEnd)
 881   DEFINE_CLASS_QUERY(Load)
 882   DEFINE_CLASS_QUERY(LoadStore)
 883   DEFINE_CLASS_QUERY(LoadStoreConditional)
 884   DEFINE_CLASS_QUERY(Lock)
 885   DEFINE_CLASS_QUERY(Loop)
 886   DEFINE_CLASS_QUERY(Mach)
 887   DEFINE_CLASS_QUERY(MachBranch)
 888   DEFINE_CLASS_QUERY(MachCall)
 889   DEFINE_CLASS_QUERY(MachCallNative)
 890   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 891   DEFINE_CLASS_QUERY(MachCallJava)
 892   DEFINE_CLASS_QUERY(MachCallLeaf)
 893   DEFINE_CLASS_QUERY(MachCallRuntime)
 894   DEFINE_CLASS_QUERY(MachCallStaticJava)
 895   DEFINE_CLASS_QUERY(MachConstantBase)
 896   DEFINE_CLASS_QUERY(MachConstant)
 897   DEFINE_CLASS_QUERY(MachGoto)
 898   DEFINE_CLASS_QUERY(MachIf)
 899   DEFINE_CLASS_QUERY(MachJump)
 900   DEFINE_CLASS_QUERY(MachNullCheck)
 901   DEFINE_CLASS_QUERY(MachProj)

 902   DEFINE_CLASS_QUERY(MachReturn)
 903   DEFINE_CLASS_QUERY(MachSafePoint)
 904   DEFINE_CLASS_QUERY(MachSpillCopy)
 905   DEFINE_CLASS_QUERY(MachTemp)
 906   DEFINE_CLASS_QUERY(MachMemBar)
 907   DEFINE_CLASS_QUERY(MachMerge)

 908   DEFINE_CLASS_QUERY(Mem)
 909   DEFINE_CLASS_QUERY(MemBar)
 910   DEFINE_CLASS_QUERY(MemBarStoreStore)
 911   DEFINE_CLASS_QUERY(MergeMem)
 912   DEFINE_CLASS_QUERY(Move)
 913   DEFINE_CLASS_QUERY(Mul)
 914   DEFINE_CLASS_QUERY(Multi)
 915   DEFINE_CLASS_QUERY(MultiBranch)
 916   DEFINE_CLASS_QUERY(Opaque1)
 917   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
 918   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
 919   DEFINE_CLASS_QUERY(Parm)
 920   DEFINE_CLASS_QUERY(PCTable)
 921   DEFINE_CLASS_QUERY(Phi)
 922   DEFINE_CLASS_QUERY(Proj)
 923   DEFINE_CLASS_QUERY(Region)
 924   DEFINE_CLASS_QUERY(Root)
 925   DEFINE_CLASS_QUERY(SafePoint)
 926   DEFINE_CLASS_QUERY(SafePointScalarObject)
 927   DEFINE_CLASS_QUERY(Start)
 928   DEFINE_CLASS_QUERY(Store)
 929   DEFINE_CLASS_QUERY(Sub)
 930   DEFINE_CLASS_QUERY(SubTypeCheck)
 931   DEFINE_CLASS_QUERY(Type)



 932   DEFINE_CLASS_QUERY(Vector)
 933   DEFINE_CLASS_QUERY(LoadVector)
 934   DEFINE_CLASS_QUERY(LoadVectorGather)
 935   DEFINE_CLASS_QUERY(StoreVector)
 936   DEFINE_CLASS_QUERY(StoreVectorScatter)
 937   DEFINE_CLASS_QUERY(VectorMaskCmp)
 938   DEFINE_CLASS_QUERY(Unlock)
 939 
 940   #undef DEFINE_CLASS_QUERY
 941 
 942   // duplicate of is_MachSpillCopy()
 943   bool is_SpillCopy () const {
 944     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 945   }
 946 
 947   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 948   // The data node which is safe to leave in dead loop during IGVN optimization.
 949   bool is_dead_loop_safe() const;
 950 
 951   // is_Copy() returns copied edge index (0 or 1)

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

 149 class PhaseRegAlloc;
 150 class PhaseTransform;
 151 class PhaseValues;
 152 class PhiNode;
 153 class Pipeline;
 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 VectorSet;
 181 
 182 // The type of all node counts and indexes.
 183 // It must hold at least 16 bits, but must also be fast to load and store.
 184 // This type, if less than 32 bits, could limit the number of possible nodes.
 185 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 186 typedef unsigned int node_idx_t;
 187 
 188 
 189 #ifndef OPTO_DU_ITERATOR_ASSERT
 190 #ifdef ASSERT
 191 #define OPTO_DU_ITERATOR_ASSERT 1

 653           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 654             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 655             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 656           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 657           DEFINE_CLASS_ID(CallNative,       Call, 5)
 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(MachCallNative,       MachCall, 2)
 685       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 686         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 687         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 688         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 689       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 690       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 691       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 692       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 693         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 694       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 695       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 696       DEFINE_CLASS_ID(MachProlog,       Mach, 8)
 697       DEFINE_CLASS_ID(MachVEP,          Mach, 9)
 698 
 699     DEFINE_CLASS_ID(Type,  Node, 2)
 700       DEFINE_CLASS_ID(Phi,   Type, 0)
 701       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 702         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 703         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 704         DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
 705         DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
 706         DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
 707         DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
 708       DEFINE_CLASS_ID(CMove, Type, 3)
 709       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 710       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 711         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 712         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 713       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 714         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 715         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 716       DEFINE_CLASS_ID(Vector, Type, 7)
 717         DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
 718       DEFINE_CLASS_ID(InlineTypeBase, Type, 8)
 719         DEFINE_CLASS_ID(InlineType, InlineTypeBase, 0)
 720         DEFINE_CLASS_ID(InlineTypePtr, InlineTypeBase, 1)
 721 
 722     DEFINE_CLASS_ID(Proj,  Node, 3)
 723       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 724       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 725       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 726         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 727         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 728       DEFINE_CLASS_ID(Parm,      Proj, 4)
 729       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 730 
 731     DEFINE_CLASS_ID(Mem, Node, 4)
 732       DEFINE_CLASS_ID(Load, Mem, 0)
 733         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 734           DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
 735           DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 1)
 736       DEFINE_CLASS_ID(Store, Mem, 1)
 737         DEFINE_CLASS_ID(StoreVector, Store, 0)
 738           DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
 739           DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 1)
 740       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 741         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 742           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 743         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 744 
 745     DEFINE_CLASS_ID(Region, Node, 5)
 746       DEFINE_CLASS_ID(Loop, Region, 0)
 747         DEFINE_CLASS_ID(Root,                Loop, 0)
 748         DEFINE_CLASS_ID(BaseCountedLoop,     Loop, 1)
 749           DEFINE_CLASS_ID(CountedLoop,       BaseCountedLoop, 0)
 750           DEFINE_CLASS_ID(LongCountedLoop,   BaseCountedLoop, 1)
 751         DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
 752 
 753     DEFINE_CLASS_ID(Sub,   Node, 6)
 754       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 755         DEFINE_CLASS_ID(FastLock,       Cmp, 0)
 756         DEFINE_CLASS_ID(FastUnlock,     Cmp, 1)
 757         DEFINE_CLASS_ID(SubTypeCheck,   Cmp, 2)
 758         DEFINE_CLASS_ID(FlatArrayCheck, Cmp, 3)
 759 
 760     DEFINE_CLASS_ID(MergeMem, Node, 7)
 761     DEFINE_CLASS_ID(Bool,     Node, 8)
 762     DEFINE_CLASS_ID(AddP,     Node, 9)
 763     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 764     DEFINE_CLASS_ID(Add,      Node, 11)
 765     DEFINE_CLASS_ID(Mul,      Node, 12)
 766     DEFINE_CLASS_ID(ClearArray, Node, 14)
 767     DEFINE_CLASS_ID(Halt,     Node, 15)
 768     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 769     DEFINE_CLASS_ID(Move,     Node, 17)
 770 
 771     _max_classes  = ClassMask_Move
 772   };
 773   #undef DEFINE_CLASS_ID
 774 
 775   // Flags are sorted by usage frequency.
 776   enum NodeFlags {
 777     Flag_is_Copy                     = 1 << 0, // should be first bit to avoid shift
 778     Flag_rematerialize               = 1 << 1,

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