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 LShiftNode;
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 MachReturnNode;
119 class MachSafePointNode;
120 class MachSpillCopyNode;
121 class MachTempNode;
122 class MachMergeNode;
123 class MachMemBarNode;
124 class Matcher;
125 class MemBarNode;
126 class MemBarStoreStoreNode;
127 class MemNode;
128 class MergeMemNode;
129 class MoveNode;
130 class MulNode;
131 class MultiNode;
132 class MultiBranchNode;
133 class NeverBranchNode;
134 class Opaque1Node;
135 class OuterStripMinedLoopNode;
136 class OuterStripMinedLoopEndNode;
137 class Node;
138 class Node_Array;
139 class Node_List;
140 class Node_Stack;
141 class OopMap;
142 class ParmNode;
143 class PCTableNode;
147 class PhaseRegAlloc;
148 class PhaseTransform;
149 class PhaseValues;
150 class PhiNode;
151 class Pipeline;
152 class ProjNode;
153 class RangeCheckNode;
154 class RegMask;
155 class RegionNode;
156 class RootNode;
157 class SafePointNode;
158 class SafePointScalarObjectNode;
159 class StartNode;
160 class State;
161 class StoreNode;
162 class SubNode;
163 class SubTypeCheckNode;
164 class Type;
165 class TypeNode;
166 class UnlockNode;
167 class VectorNode;
168 class LoadVectorNode;
169 class LoadVectorMaskedNode;
170 class StoreVectorMaskedNode;
171 class LoadVectorGatherNode;
172 class StoreVectorNode;
173 class StoreVectorScatterNode;
174 class VectorMaskCmpNode;
175 class VectorUnboxNode;
176 class VectorSet;
177 class VectorReinterpretNode;
178 class ShiftVNode;
179
180 // The type of all node counts and indexes.
181 // It must hold at least 16 bits, but must also be fast to load and store.
182 // This type, if less than 32 bits, could limit the number of possible nodes.
183 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
184 typedef unsigned int node_idx_t;
185
186
651 DEFINE_CLASS_ID(AbstractLock, Call, 3)
652 DEFINE_CLASS_ID(Lock, AbstractLock, 0)
653 DEFINE_CLASS_ID(Unlock, AbstractLock, 1)
654 DEFINE_CLASS_ID(ArrayCopy, Call, 4)
655 DEFINE_CLASS_ID(CallNative, Call, 5)
656 DEFINE_CLASS_ID(MultiBranch, Multi, 1)
657 DEFINE_CLASS_ID(PCTable, MultiBranch, 0)
658 DEFINE_CLASS_ID(Catch, PCTable, 0)
659 DEFINE_CLASS_ID(Jump, PCTable, 1)
660 DEFINE_CLASS_ID(If, MultiBranch, 1)
661 DEFINE_CLASS_ID(BaseCountedLoopEnd, If, 0)
662 DEFINE_CLASS_ID(CountedLoopEnd, BaseCountedLoopEnd, 0)
663 DEFINE_CLASS_ID(LongCountedLoopEnd, BaseCountedLoopEnd, 1)
664 DEFINE_CLASS_ID(RangeCheck, If, 1)
665 DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
666 DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
667 DEFINE_CLASS_ID(Start, Multi, 2)
668 DEFINE_CLASS_ID(MemBar, Multi, 3)
669 DEFINE_CLASS_ID(Initialize, MemBar, 0)
670 DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
671
672 DEFINE_CLASS_ID(Mach, Node, 1)
673 DEFINE_CLASS_ID(MachReturn, Mach, 0)
674 DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
675 DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
676 DEFINE_CLASS_ID(MachCallJava, MachCall, 0)
677 DEFINE_CLASS_ID(MachCallStaticJava, MachCallJava, 0)
678 DEFINE_CLASS_ID(MachCallDynamicJava, MachCallJava, 1)
679 DEFINE_CLASS_ID(MachCallRuntime, MachCall, 1)
680 DEFINE_CLASS_ID(MachCallLeaf, MachCallRuntime, 0)
681 DEFINE_CLASS_ID(MachCallNative, MachCall, 2)
682 DEFINE_CLASS_ID(MachBranch, Mach, 1)
683 DEFINE_CLASS_ID(MachIf, MachBranch, 0)
684 DEFINE_CLASS_ID(MachGoto, MachBranch, 1)
685 DEFINE_CLASS_ID(MachNullCheck, MachBranch, 2)
686 DEFINE_CLASS_ID(MachSpillCopy, Mach, 2)
687 DEFINE_CLASS_ID(MachTemp, Mach, 3)
688 DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
689 DEFINE_CLASS_ID(MachConstant, Mach, 5)
690 DEFINE_CLASS_ID(MachJump, MachConstant, 0)
691 DEFINE_CLASS_ID(MachMerge, Mach, 6)
692 DEFINE_CLASS_ID(MachMemBar, Mach, 7)
693
694 DEFINE_CLASS_ID(Type, Node, 2)
695 DEFINE_CLASS_ID(Phi, Type, 0)
696 DEFINE_CLASS_ID(ConstraintCast, Type, 1)
697 DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
698 DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
699 DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
700 DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
701 DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
702 DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
703 DEFINE_CLASS_ID(CMove, Type, 3)
704 DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
705 DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
706 DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
707 DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
708 DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
709 DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
710 DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
711 DEFINE_CLASS_ID(Vector, Type, 7)
712 DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
713 DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
714 DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
715 DEFINE_CLASS_ID(ShiftV, Vector, 3)
716
717 DEFINE_CLASS_ID(Proj, Node, 3)
718 DEFINE_CLASS_ID(CatchProj, Proj, 0)
719 DEFINE_CLASS_ID(JumpProj, Proj, 1)
720 DEFINE_CLASS_ID(IfProj, Proj, 2)
721 DEFINE_CLASS_ID(IfTrue, IfProj, 0)
722 DEFINE_CLASS_ID(IfFalse, IfProj, 1)
723 DEFINE_CLASS_ID(Parm, Proj, 4)
724 DEFINE_CLASS_ID(MachProj, Proj, 5)
725
726 DEFINE_CLASS_ID(Mem, Node, 4)
727 DEFINE_CLASS_ID(Load, Mem, 0)
728 DEFINE_CLASS_ID(LoadVector, Load, 0)
729 DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
730 DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 1)
731 DEFINE_CLASS_ID(Store, Mem, 1)
732 DEFINE_CLASS_ID(StoreVector, Store, 0)
733 DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
734 DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 1)
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(CallNative)
855 DEFINE_CLASS_QUERY(CallDynamicJava)
856 DEFINE_CLASS_QUERY(CallJava)
857 DEFINE_CLASS_QUERY(CallLeaf)
858 DEFINE_CLASS_QUERY(CallLeafNoFP)
859 DEFINE_CLASS_QUERY(CallRuntime)
860 DEFINE_CLASS_QUERY(CallStaticJava)
861 DEFINE_CLASS_QUERY(Catch)
862 DEFINE_CLASS_QUERY(CatchProj)
863 DEFINE_CLASS_QUERY(CheckCastPP)
864 DEFINE_CLASS_QUERY(CastII)
865 DEFINE_CLASS_QUERY(CastLL)
866 DEFINE_CLASS_QUERY(ConstraintCast)
867 DEFINE_CLASS_QUERY(ClearArray)
868 DEFINE_CLASS_QUERY(CMove)
869 DEFINE_CLASS_QUERY(Cmp)
870 DEFINE_CLASS_QUERY(CountedLoop)
871 DEFINE_CLASS_QUERY(CountedLoopEnd)
872 DEFINE_CLASS_QUERY(DecodeNarrowPtr)
873 DEFINE_CLASS_QUERY(DecodeN)
874 DEFINE_CLASS_QUERY(DecodeNKlass)
875 DEFINE_CLASS_QUERY(EncodeNarrowPtr)
876 DEFINE_CLASS_QUERY(EncodeP)
877 DEFINE_CLASS_QUERY(EncodePKlass)
878 DEFINE_CLASS_QUERY(FastLock)
879 DEFINE_CLASS_QUERY(FastUnlock)
880 DEFINE_CLASS_QUERY(Halt)
881 DEFINE_CLASS_QUERY(If)
882 DEFINE_CLASS_QUERY(RangeCheck)
883 DEFINE_CLASS_QUERY(IfProj)
884 DEFINE_CLASS_QUERY(IfFalse)
885 DEFINE_CLASS_QUERY(IfTrue)
886 DEFINE_CLASS_QUERY(Initialize)
887 DEFINE_CLASS_QUERY(Jump)
888 DEFINE_CLASS_QUERY(JumpProj)
889 DEFINE_CLASS_QUERY(LongCountedLoop)
890 DEFINE_CLASS_QUERY(LongCountedLoopEnd)
891 DEFINE_CLASS_QUERY(Load)
892 DEFINE_CLASS_QUERY(LoadStore)
893 DEFINE_CLASS_QUERY(LoadStoreConditional)
894 DEFINE_CLASS_QUERY(Lock)
895 DEFINE_CLASS_QUERY(Loop)
896 DEFINE_CLASS_QUERY(LShift)
897 DEFINE_CLASS_QUERY(Mach)
898 DEFINE_CLASS_QUERY(MachBranch)
899 DEFINE_CLASS_QUERY(MachCall)
900 DEFINE_CLASS_QUERY(MachCallNative)
901 DEFINE_CLASS_QUERY(MachCallDynamicJava)
902 DEFINE_CLASS_QUERY(MachCallJava)
903 DEFINE_CLASS_QUERY(MachCallLeaf)
904 DEFINE_CLASS_QUERY(MachCallRuntime)
905 DEFINE_CLASS_QUERY(MachCallStaticJava)
906 DEFINE_CLASS_QUERY(MachConstantBase)
907 DEFINE_CLASS_QUERY(MachConstant)
908 DEFINE_CLASS_QUERY(MachGoto)
909 DEFINE_CLASS_QUERY(MachIf)
910 DEFINE_CLASS_QUERY(MachJump)
911 DEFINE_CLASS_QUERY(MachNullCheck)
912 DEFINE_CLASS_QUERY(MachProj)
913 DEFINE_CLASS_QUERY(MachReturn)
914 DEFINE_CLASS_QUERY(MachSafePoint)
915 DEFINE_CLASS_QUERY(MachSpillCopy)
916 DEFINE_CLASS_QUERY(MachTemp)
917 DEFINE_CLASS_QUERY(MachMemBar)
918 DEFINE_CLASS_QUERY(MachMerge)
919 DEFINE_CLASS_QUERY(Mem)
920 DEFINE_CLASS_QUERY(MemBar)
921 DEFINE_CLASS_QUERY(MemBarStoreStore)
922 DEFINE_CLASS_QUERY(MergeMem)
923 DEFINE_CLASS_QUERY(Move)
924 DEFINE_CLASS_QUERY(Mul)
925 DEFINE_CLASS_QUERY(Multi)
926 DEFINE_CLASS_QUERY(MultiBranch)
927 DEFINE_CLASS_QUERY(Opaque1)
928 DEFINE_CLASS_QUERY(OuterStripMinedLoop)
929 DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
930 DEFINE_CLASS_QUERY(Parm)
931 DEFINE_CLASS_QUERY(PCTable)
932 DEFINE_CLASS_QUERY(Phi)
933 DEFINE_CLASS_QUERY(Proj)
934 DEFINE_CLASS_QUERY(Region)
935 DEFINE_CLASS_QUERY(Root)
936 DEFINE_CLASS_QUERY(SafePoint)
937 DEFINE_CLASS_QUERY(SafePointScalarObject)
938 DEFINE_CLASS_QUERY(Start)
939 DEFINE_CLASS_QUERY(Store)
940 DEFINE_CLASS_QUERY(Sub)
941 DEFINE_CLASS_QUERY(SubTypeCheck)
942 DEFINE_CLASS_QUERY(Type)
943 DEFINE_CLASS_QUERY(Vector)
944 DEFINE_CLASS_QUERY(VectorMaskCmp)
945 DEFINE_CLASS_QUERY(VectorUnbox)
946 DEFINE_CLASS_QUERY(VectorReinterpret);
947 DEFINE_CLASS_QUERY(LoadVector)
948 DEFINE_CLASS_QUERY(LoadVectorGather)
949 DEFINE_CLASS_QUERY(StoreVector)
950 DEFINE_CLASS_QUERY(StoreVectorScatter)
951 DEFINE_CLASS_QUERY(ShiftV)
952 DEFINE_CLASS_QUERY(Unlock)
953
954 #undef DEFINE_CLASS_QUERY
955
956 // duplicate of is_MachSpillCopy()
957 bool is_SpillCopy () const {
958 return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
959 }
960
961 bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
962 // The data node which is safe to leave in dead loop during IGVN optimization.
|
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 LShiftNode;
103 class MachBranchNode;
104 class MachCallDynamicJavaNode;
105 class MachCallJavaNode;
106 class MachCallLeafNode;
107 class MachCallNode;
108 class MachCallNativeNode;
109 class MachCallRuntimeNode;
110 class MachCallStaticJavaNode;
111 class MachConstantBaseNode;
112 class MachConstantNode;
113 class MachGotoNode;
114 class MachIfNode;
115 class MachJumpNode;
116 class MachNode;
117 class MachNullCheckNode;
118 class MachProjNode;
119 class MachPrologNode;
120 class MachReturnNode;
121 class MachSafePointNode;
122 class MachSpillCopyNode;
123 class MachTempNode;
124 class MachMergeNode;
125 class MachMemBarNode;
126 class MachVEPNode;
127 class Matcher;
128 class MemBarNode;
129 class MemBarStoreStoreNode;
130 class MemNode;
131 class MergeMemNode;
132 class MoveNode;
133 class MulNode;
134 class MultiNode;
135 class MultiBranchNode;
136 class NeverBranchNode;
137 class Opaque1Node;
138 class OuterStripMinedLoopNode;
139 class OuterStripMinedLoopEndNode;
140 class Node;
141 class Node_Array;
142 class Node_List;
143 class Node_Stack;
144 class OopMap;
145 class ParmNode;
146 class PCTableNode;
150 class PhaseRegAlloc;
151 class PhaseTransform;
152 class PhaseValues;
153 class PhiNode;
154 class Pipeline;
155 class ProjNode;
156 class RangeCheckNode;
157 class RegMask;
158 class RegionNode;
159 class RootNode;
160 class SafePointNode;
161 class SafePointScalarObjectNode;
162 class StartNode;
163 class State;
164 class StoreNode;
165 class SubNode;
166 class SubTypeCheckNode;
167 class Type;
168 class TypeNode;
169 class UnlockNode;
170 class InlineTypeBaseNode;
171 class InlineTypeNode;
172 class InlineTypePtrNode;
173 class VectorNode;
174 class LoadVectorNode;
175 class LoadVectorMaskedNode;
176 class StoreVectorMaskedNode;
177 class LoadVectorGatherNode;
178 class StoreVectorNode;
179 class StoreVectorScatterNode;
180 class VectorMaskCmpNode;
181 class VectorUnboxNode;
182 class VectorSet;
183 class VectorReinterpretNode;
184 class ShiftVNode;
185
186 // The type of all node counts and indexes.
187 // It must hold at least 16 bits, but must also be fast to load and store.
188 // This type, if less than 32 bits, could limit the number of possible nodes.
189 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
190 typedef unsigned int node_idx_t;
191
192
657 DEFINE_CLASS_ID(AbstractLock, Call, 3)
658 DEFINE_CLASS_ID(Lock, AbstractLock, 0)
659 DEFINE_CLASS_ID(Unlock, AbstractLock, 1)
660 DEFINE_CLASS_ID(ArrayCopy, Call, 4)
661 DEFINE_CLASS_ID(CallNative, Call, 5)
662 DEFINE_CLASS_ID(MultiBranch, Multi, 1)
663 DEFINE_CLASS_ID(PCTable, MultiBranch, 0)
664 DEFINE_CLASS_ID(Catch, PCTable, 0)
665 DEFINE_CLASS_ID(Jump, PCTable, 1)
666 DEFINE_CLASS_ID(If, MultiBranch, 1)
667 DEFINE_CLASS_ID(BaseCountedLoopEnd, If, 0)
668 DEFINE_CLASS_ID(CountedLoopEnd, BaseCountedLoopEnd, 0)
669 DEFINE_CLASS_ID(LongCountedLoopEnd, BaseCountedLoopEnd, 1)
670 DEFINE_CLASS_ID(RangeCheck, If, 1)
671 DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
672 DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
673 DEFINE_CLASS_ID(Start, Multi, 2)
674 DEFINE_CLASS_ID(MemBar, Multi, 3)
675 DEFINE_CLASS_ID(Initialize, MemBar, 0)
676 DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
677 DEFINE_CLASS_ID(Blackhole, MemBar, 2)
678
679 DEFINE_CLASS_ID(Mach, Node, 1)
680 DEFINE_CLASS_ID(MachReturn, Mach, 0)
681 DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
682 DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
683 DEFINE_CLASS_ID(MachCallJava, MachCall, 0)
684 DEFINE_CLASS_ID(MachCallStaticJava, MachCallJava, 0)
685 DEFINE_CLASS_ID(MachCallDynamicJava, MachCallJava, 1)
686 DEFINE_CLASS_ID(MachCallRuntime, MachCall, 1)
687 DEFINE_CLASS_ID(MachCallLeaf, MachCallRuntime, 0)
688 DEFINE_CLASS_ID(MachCallNative, MachCall, 2)
689 DEFINE_CLASS_ID(MachBranch, Mach, 1)
690 DEFINE_CLASS_ID(MachIf, MachBranch, 0)
691 DEFINE_CLASS_ID(MachGoto, MachBranch, 1)
692 DEFINE_CLASS_ID(MachNullCheck, MachBranch, 2)
693 DEFINE_CLASS_ID(MachSpillCopy, Mach, 2)
694 DEFINE_CLASS_ID(MachTemp, Mach, 3)
695 DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
696 DEFINE_CLASS_ID(MachConstant, Mach, 5)
697 DEFINE_CLASS_ID(MachJump, MachConstant, 0)
698 DEFINE_CLASS_ID(MachMerge, Mach, 6)
699 DEFINE_CLASS_ID(MachMemBar, Mach, 7)
700 DEFINE_CLASS_ID(MachProlog, Mach, 8)
701 DEFINE_CLASS_ID(MachVEP, Mach, 9)
702
703 DEFINE_CLASS_ID(Type, Node, 2)
704 DEFINE_CLASS_ID(Phi, Type, 0)
705 DEFINE_CLASS_ID(ConstraintCast, Type, 1)
706 DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
707 DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
708 DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
709 DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
710 DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
711 DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
712 DEFINE_CLASS_ID(CMove, Type, 3)
713 DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
714 DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
715 DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
716 DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
717 DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
718 DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
719 DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
720 DEFINE_CLASS_ID(Vector, Type, 7)
721 DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
722 DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
723 DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
724 DEFINE_CLASS_ID(ShiftV, Vector, 3)
725 DEFINE_CLASS_ID(InlineTypeBase, Type, 8)
726 DEFINE_CLASS_ID(InlineType, InlineTypeBase, 0)
727 DEFINE_CLASS_ID(InlineTypePtr, InlineTypeBase, 1)
728 DEFINE_CLASS_ID(Proj, Node, 3)
729 DEFINE_CLASS_ID(CatchProj, Proj, 0)
730 DEFINE_CLASS_ID(JumpProj, Proj, 1)
731 DEFINE_CLASS_ID(IfProj, Proj, 2)
732 DEFINE_CLASS_ID(IfTrue, IfProj, 0)
733 DEFINE_CLASS_ID(IfFalse, IfProj, 1)
734 DEFINE_CLASS_ID(Parm, Proj, 4)
735 DEFINE_CLASS_ID(MachProj, Proj, 5)
736
737 DEFINE_CLASS_ID(Mem, Node, 4)
738 DEFINE_CLASS_ID(Load, Mem, 0)
739 DEFINE_CLASS_ID(LoadVector, Load, 0)
740 DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
741 DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 1)
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(StoreVectorMasked, StoreVector, 1)
746 DEFINE_CLASS_ID(LoadStore, Mem, 2)
747 DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
748 DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
749 DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
750
751 DEFINE_CLASS_ID(Region, Node, 5)
752 DEFINE_CLASS_ID(Loop, Region, 0)
753 DEFINE_CLASS_ID(Root, Loop, 0)
754 DEFINE_CLASS_ID(BaseCountedLoop, Loop, 1)
755 DEFINE_CLASS_ID(CountedLoop, BaseCountedLoop, 0)
756 DEFINE_CLASS_ID(LongCountedLoop, BaseCountedLoop, 1)
757 DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
758
759 DEFINE_CLASS_ID(Sub, Node, 6)
760 DEFINE_CLASS_ID(Cmp, Sub, 0)
761 DEFINE_CLASS_ID(FastLock, Cmp, 0)
762 DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
763 DEFINE_CLASS_ID(SubTypeCheck, Cmp, 2)
764 DEFINE_CLASS_ID(FlatArrayCheck, Cmp, 3)
765
766 DEFINE_CLASS_ID(MergeMem, Node, 7)
767 DEFINE_CLASS_ID(Bool, Node, 8)
768 DEFINE_CLASS_ID(AddP, Node, 9)
769 DEFINE_CLASS_ID(BoxLock, Node, 10)
770 DEFINE_CLASS_ID(Add, Node, 11)
771 DEFINE_CLASS_ID(Mul, Node, 12)
772 DEFINE_CLASS_ID(ClearArray, Node, 14)
773 DEFINE_CLASS_ID(Halt, Node, 15)
774 DEFINE_CLASS_ID(Opaque1, Node, 16)
775 DEFINE_CLASS_ID(Move, Node, 17)
776 DEFINE_CLASS_ID(LShift, Node, 18)
777
778 _max_classes = ClassMask_Move
779 };
780 #undef DEFINE_CLASS_ID
781
782 // Flags are sorted by usage frequency.
783 enum NodeFlags {
784 Flag_is_Copy = 1 << 0, // should be first bit to avoid shift
843 #define DEFINE_CLASS_QUERY(type) \
844 bool is_##type() const { \
845 return ((_class_id & ClassMask_##type) == Class_##type); \
846 } \
847 type##Node *as_##type() const { \
848 assert(is_##type(), "invalid node class: %s", Name()); \
849 return (type##Node*)this; \
850 } \
851 type##Node* isa_##type() const { \
852 return (is_##type()) ? as_##type() : NULL; \
853 }
854
855 DEFINE_CLASS_QUERY(AbstractLock)
856 DEFINE_CLASS_QUERY(Add)
857 DEFINE_CLASS_QUERY(AddP)
858 DEFINE_CLASS_QUERY(Allocate)
859 DEFINE_CLASS_QUERY(AllocateArray)
860 DEFINE_CLASS_QUERY(ArrayCopy)
861 DEFINE_CLASS_QUERY(BaseCountedLoop)
862 DEFINE_CLASS_QUERY(BaseCountedLoopEnd)
863 DEFINE_CLASS_QUERY(Blackhole)
864 DEFINE_CLASS_QUERY(Bool)
865 DEFINE_CLASS_QUERY(BoxLock)
866 DEFINE_CLASS_QUERY(Call)
867 DEFINE_CLASS_QUERY(CallNative)
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(MachCallNative)
915 DEFINE_CLASS_QUERY(MachCallDynamicJava)
916 DEFINE_CLASS_QUERY(MachCallJava)
917 DEFINE_CLASS_QUERY(MachCallLeaf)
918 DEFINE_CLASS_QUERY(MachCallRuntime)
919 DEFINE_CLASS_QUERY(MachCallStaticJava)
920 DEFINE_CLASS_QUERY(MachConstantBase)
921 DEFINE_CLASS_QUERY(MachConstant)
922 DEFINE_CLASS_QUERY(MachGoto)
923 DEFINE_CLASS_QUERY(MachIf)
924 DEFINE_CLASS_QUERY(MachJump)
925 DEFINE_CLASS_QUERY(MachNullCheck)
926 DEFINE_CLASS_QUERY(MachProj)
927 DEFINE_CLASS_QUERY(MachProlog)
928 DEFINE_CLASS_QUERY(MachReturn)
929 DEFINE_CLASS_QUERY(MachSafePoint)
930 DEFINE_CLASS_QUERY(MachSpillCopy)
931 DEFINE_CLASS_QUERY(MachTemp)
932 DEFINE_CLASS_QUERY(MachMemBar)
933 DEFINE_CLASS_QUERY(MachMerge)
934 DEFINE_CLASS_QUERY(MachVEP)
935 DEFINE_CLASS_QUERY(Mem)
936 DEFINE_CLASS_QUERY(MemBar)
937 DEFINE_CLASS_QUERY(MemBarStoreStore)
938 DEFINE_CLASS_QUERY(MergeMem)
939 DEFINE_CLASS_QUERY(Move)
940 DEFINE_CLASS_QUERY(Mul)
941 DEFINE_CLASS_QUERY(Multi)
942 DEFINE_CLASS_QUERY(MultiBranch)
943 DEFINE_CLASS_QUERY(Opaque1)
944 DEFINE_CLASS_QUERY(OuterStripMinedLoop)
945 DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
946 DEFINE_CLASS_QUERY(Parm)
947 DEFINE_CLASS_QUERY(PCTable)
948 DEFINE_CLASS_QUERY(Phi)
949 DEFINE_CLASS_QUERY(Proj)
950 DEFINE_CLASS_QUERY(Region)
951 DEFINE_CLASS_QUERY(Root)
952 DEFINE_CLASS_QUERY(SafePoint)
953 DEFINE_CLASS_QUERY(SafePointScalarObject)
954 DEFINE_CLASS_QUERY(Start)
955 DEFINE_CLASS_QUERY(Store)
956 DEFINE_CLASS_QUERY(Sub)
957 DEFINE_CLASS_QUERY(SubTypeCheck)
958 DEFINE_CLASS_QUERY(Type)
959 DEFINE_CLASS_QUERY(InlineType)
960 DEFINE_CLASS_QUERY(InlineTypeBase)
961 DEFINE_CLASS_QUERY(InlineTypePtr)
962 DEFINE_CLASS_QUERY(Vector)
963 DEFINE_CLASS_QUERY(VectorMaskCmp)
964 DEFINE_CLASS_QUERY(VectorUnbox)
965 DEFINE_CLASS_QUERY(VectorReinterpret);
966 DEFINE_CLASS_QUERY(LoadVector)
967 DEFINE_CLASS_QUERY(LoadVectorGather)
968 DEFINE_CLASS_QUERY(StoreVector)
969 DEFINE_CLASS_QUERY(StoreVectorScatter)
970 DEFINE_CLASS_QUERY(ShiftV)
971 DEFINE_CLASS_QUERY(Unlock)
972
973 #undef DEFINE_CLASS_QUERY
974
975 // duplicate of is_MachSpillCopy()
976 bool is_SpillCopy () const {
977 return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
978 }
979
980 bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
981 // The data node which is safe to leave in dead loop during IGVN optimization.
|