< prev index next >

src/hotspot/share/opto/node.hpp

Print this page

  70 class CheckCastPPNode;
  71 class ClearArrayNode;
  72 class CmpNode;
  73 class CodeBuffer;
  74 class ConstraintCastNode;
  75 class ConNode;
  76 class ConINode;
  77 class ConvertNode;
  78 class CompareAndSwapNode;
  79 class CompareAndExchangeNode;
  80 class CountedLoopNode;
  81 class CountedLoopEndNode;
  82 class DecodeNarrowPtrNode;
  83 class DecodeNNode;
  84 class DecodeNKlassNode;
  85 class EncodeNarrowPtrNode;
  86 class EncodePNode;
  87 class EncodePKlassNode;
  88 class FastLockNode;
  89 class FastUnlockNode;

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

 122 class MachReturnNode;
 123 class MachSafePointNode;
 124 class MachSpillCopyNode;
 125 class MachTempNode;
 126 class MachMergeNode;
 127 class MachMemBarNode;

 128 class Matcher;
 129 class MemBarNode;
 130 class MemBarStoreStoreNode;
 131 class MemNode;
 132 class MergeMemNode;
 133 class MinMaxNode;
 134 class MoveNode;
 135 class MulNode;
 136 class MultiNode;
 137 class MultiBranchNode;
 138 class NarrowMemProjNode;
 139 class NegNode;
 140 class NegVNode;
 141 class NeverBranchNode;
 142 class Opaque1Node;
 143 class OpaqueLoopInitNode;
 144 class OpaqueLoopStrideNode;
 145 class OpaqueMultiversioningNode;
 146 class OpaqueConstantBoolNode;
 147 class OpaqueInitializedAssertionPredicateNode;

 167 class Pipeline;
 168 class PopulateIndexNode;
 169 class ProjNode;
 170 class RangeCheckNode;
 171 class ReductionNode;
 172 class RegMask;
 173 class RegionNode;
 174 class RootNode;
 175 class SafePointNode;
 176 class SafePointScalarObjectNode;
 177 class SafePointScalarMergeNode;
 178 class SaturatingVectorNode;
 179 class StartNode;
 180 class State;
 181 class StoreNode;
 182 class SubNode;
 183 class SubTypeCheckNode;
 184 class Type;
 185 class TypeNode;
 186 class UnlockNode;



 187 class VectorNode;
 188 class LoadVectorNode;
 189 class LoadVectorMaskedNode;
 190 class StoreVectorMaskedNode;
 191 class LoadVectorGatherNode;
 192 class LoadVectorGatherMaskedNode;
 193 class StoreVectorNode;
 194 class StoreVectorScatterNode;
 195 class StoreVectorScatterMaskedNode;
 196 class VerifyVectorAlignmentNode;
 197 class VectorMaskCmpNode;
 198 class VectorUnboxNode;
 199 class VectorSet;
 200 class VectorReinterpretNode;
 201 class ShiftVNode;
 202 class MulVLNode;
 203 class ExpandVNode;
 204 class CompressVNode;
 205 class CompressMNode;
 206 class C2_MacroAssembler;

 673     Bit_Node   = 0x00000000,
 674     Class_Node = 0x00000000,
 675     ClassMask_Node = 0xFFFFFFFF,
 676 
 677     DEFINE_CLASS_ID(Multi, Node, 0)
 678       DEFINE_CLASS_ID(SafePoint, Multi, 0)
 679         DEFINE_CLASS_ID(Call,      SafePoint, 0)
 680           DEFINE_CLASS_ID(CallJava,         Call, 0)
 681             DEFINE_CLASS_ID(CallStaticJava,   CallJava, 0)
 682             DEFINE_CLASS_ID(CallDynamicJava,  CallJava, 1)
 683           DEFINE_CLASS_ID(CallRuntime,      Call, 1)
 684             DEFINE_CLASS_ID(CallLeaf,         CallRuntime, 0)
 685               DEFINE_CLASS_ID(CallLeafNoFP,     CallLeaf, 0)
 686               DEFINE_CLASS_ID(CallLeafPure,     CallLeaf, 1)
 687           DEFINE_CLASS_ID(Allocate,         Call, 2)
 688             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 689           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 690             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 691             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 692           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)


 693       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 694         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 695           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 696           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 697         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 698           DEFINE_CLASS_ID(BaseCountedLoopEnd,     If, 0)
 699             DEFINE_CLASS_ID(CountedLoopEnd,       BaseCountedLoopEnd, 0)
 700             DEFINE_CLASS_ID(LongCountedLoopEnd,   BaseCountedLoopEnd, 1)
 701           DEFINE_CLASS_ID(RangeCheck,             If, 1)
 702           DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
 703           DEFINE_CLASS_ID(ParsePredicate,         If, 3)
 704         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 705       DEFINE_CLASS_ID(Start,       Multi, 2)
 706       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 707         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 708         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)

 709 
 710     DEFINE_CLASS_ID(Mach,  Node, 1)
 711       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 712         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 713           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 714             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 715               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 716               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 717             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 718               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 719       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 720         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 721         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 722         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 723       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 724       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 725       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 726       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 727         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 728       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 729       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)


 730 
 731     DEFINE_CLASS_ID(Type,  Node, 2)
 732       DEFINE_CLASS_ID(Phi,   Type, 0)
 733       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 734         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 735         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 736         DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
 737         DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
 738         DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
 739         DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
 740         DEFINE_CLASS_ID(CastPP, ConstraintCast, 6)
 741         DEFINE_CLASS_ID(CastHH, ConstraintCast, 7)
 742       DEFINE_CLASS_ID(CMove, Type, 3)
 743       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 744       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 745         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 746         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 747       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 748         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 749         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 750       DEFINE_CLASS_ID(Vector, Type, 7)
 751         DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
 752         DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
 753         DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
 754         DEFINE_CLASS_ID(ShiftV, Vector, 3)
 755         DEFINE_CLASS_ID(CompressV, Vector, 4)
 756         DEFINE_CLASS_ID(ExpandV, Vector, 5)
 757         DEFINE_CLASS_ID(CompressM, Vector, 6)
 758         DEFINE_CLASS_ID(Reduction, Vector, 7)
 759         DEFINE_CLASS_ID(NegV, Vector, 8)
 760         DEFINE_CLASS_ID(SaturatingVector, Vector, 9)
 761         DEFINE_CLASS_ID(MulVL, Vector, 10)
 762       DEFINE_CLASS_ID(Con, Type, 8)

 763           DEFINE_CLASS_ID(ConI, Con, 0)
 764       DEFINE_CLASS_ID(SafePointScalarMerge, Type, 9)
 765       DEFINE_CLASS_ID(Convert, Type, 10)
 766 
 767 
 768     DEFINE_CLASS_ID(Proj,  Node, 3)
 769       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 770       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 771       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 772         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 773         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 774       DEFINE_CLASS_ID(Parm,      Proj, 4)
 775       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 776       DEFINE_CLASS_ID(NarrowMemProj, Proj, 6)
 777 
 778     DEFINE_CLASS_ID(Mem, Node, 4)
 779       DEFINE_CLASS_ID(Load, Mem, 0)
 780         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 781           DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
 782           DEFINE_CLASS_ID(LoadVectorGatherMasked, LoadVector, 1)
 783           DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 2)
 784       DEFINE_CLASS_ID(Store, Mem, 1)
 785         DEFINE_CLASS_ID(StoreVector, Store, 0)
 786           DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
 787           DEFINE_CLASS_ID(StoreVectorScatterMasked, StoreVector, 1)
 788           DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 2)
 789       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 790         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 791           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 792         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 793 
 794     DEFINE_CLASS_ID(Region, Node, 5)
 795       DEFINE_CLASS_ID(Loop, Region, 0)
 796         DEFINE_CLASS_ID(Root,                Loop, 0)
 797         DEFINE_CLASS_ID(BaseCountedLoop,     Loop, 1)
 798           DEFINE_CLASS_ID(CountedLoop,       BaseCountedLoop, 0)
 799           DEFINE_CLASS_ID(LongCountedLoop,   BaseCountedLoop, 1)
 800         DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
 801 
 802     DEFINE_CLASS_ID(Sub,   Node, 6)
 803       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 804         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 805         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 806         DEFINE_CLASS_ID(SubTypeCheck,Cmp, 2)

 807 
 808     DEFINE_CLASS_ID(MergeMem, Node, 7)
 809     DEFINE_CLASS_ID(Bool,     Node, 8)
 810     DEFINE_CLASS_ID(AddP,     Node, 9)
 811     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 812     DEFINE_CLASS_ID(Add,      Node, 11)
 813       DEFINE_CLASS_ID(MinMax,      Add, 0)
 814     DEFINE_CLASS_ID(Mul,      Node, 12)
 815     DEFINE_CLASS_ID(ClearArray, Node, 14)
 816     DEFINE_CLASS_ID(Halt,     Node, 15)
 817     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 818       DEFINE_CLASS_ID(OpaqueLoopInit, Opaque1, 0)
 819       DEFINE_CLASS_ID(OpaqueLoopStride, Opaque1, 1)
 820       DEFINE_CLASS_ID(OpaqueMultiversioning, Opaque1, 2)
 821     DEFINE_CLASS_ID(OpaqueConstantBool,  Node, 17)
 822     DEFINE_CLASS_ID(OpaqueInitializedAssertionPredicate,  Node, 18)
 823     DEFINE_CLASS_ID(OpaqueTemplateAssertionPredicate,  Node, 19)
 824     DEFINE_CLASS_ID(Move,     Node, 20)
 825     DEFINE_CLASS_ID(LShift,   Node, 21)
 826     DEFINE_CLASS_ID(Neg,      Node, 22)

 897   #define DEFINE_CLASS_QUERY(type)                           \
 898   bool is_##type() const {                                   \
 899     return ((_class_id & ClassMask_##type) == Class_##type); \
 900   }                                                          \
 901   type##Node *as_##type() const {                            \
 902     assert(is_##type(), "invalid node class: %s", Name());   \
 903     return (type##Node*)this;                                \
 904   }                                                          \
 905   type##Node* isa_##type() const {                           \
 906     return (is_##type()) ? as_##type() : nullptr;            \
 907   }
 908 
 909   DEFINE_CLASS_QUERY(AbstractLock)
 910   DEFINE_CLASS_QUERY(Add)
 911   DEFINE_CLASS_QUERY(AddP)
 912   DEFINE_CLASS_QUERY(Allocate)
 913   DEFINE_CLASS_QUERY(AllocateArray)
 914   DEFINE_CLASS_QUERY(ArrayCopy)
 915   DEFINE_CLASS_QUERY(BaseCountedLoop)
 916   DEFINE_CLASS_QUERY(BaseCountedLoopEnd)

 917   DEFINE_CLASS_QUERY(Bool)
 918   DEFINE_CLASS_QUERY(BoxLock)
 919   DEFINE_CLASS_QUERY(Call)
 920   DEFINE_CLASS_QUERY(CallDynamicJava)
 921   DEFINE_CLASS_QUERY(CallJava)
 922   DEFINE_CLASS_QUERY(CallLeaf)
 923   DEFINE_CLASS_QUERY(CallLeafNoFP)
 924   DEFINE_CLASS_QUERY(CallLeafPure)
 925   DEFINE_CLASS_QUERY(CallRuntime)
 926   DEFINE_CLASS_QUERY(CallStaticJava)
 927   DEFINE_CLASS_QUERY(Catch)
 928   DEFINE_CLASS_QUERY(CatchProj)
 929   DEFINE_CLASS_QUERY(CheckCastPP)
 930   DEFINE_CLASS_QUERY(CastII)
 931   DEFINE_CLASS_QUERY(CastLL)
 932   DEFINE_CLASS_QUERY(CastFF)
 933   DEFINE_CLASS_QUERY(ConI)
 934   DEFINE_CLASS_QUERY(CastPP)
 935   DEFINE_CLASS_QUERY(ConstraintCast)
 936   DEFINE_CLASS_QUERY(ClearArray)
 937   DEFINE_CLASS_QUERY(CMove)
 938   DEFINE_CLASS_QUERY(Cmp)
 939   DEFINE_CLASS_QUERY(Convert)
 940   DEFINE_CLASS_QUERY(CountedLoop)
 941   DEFINE_CLASS_QUERY(CountedLoopEnd)
 942   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 943   DEFINE_CLASS_QUERY(DecodeN)
 944   DEFINE_CLASS_QUERY(DecodeNKlass)
 945   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 946   DEFINE_CLASS_QUERY(EncodeP)
 947   DEFINE_CLASS_QUERY(EncodePKlass)
 948   DEFINE_CLASS_QUERY(FastLock)
 949   DEFINE_CLASS_QUERY(FastUnlock)

 950   DEFINE_CLASS_QUERY(Halt)
 951   DEFINE_CLASS_QUERY(If)
 952   DEFINE_CLASS_QUERY(RangeCheck)
 953   DEFINE_CLASS_QUERY(IfProj)
 954   DEFINE_CLASS_QUERY(IfFalse)
 955   DEFINE_CLASS_QUERY(IfTrue)
 956   DEFINE_CLASS_QUERY(Initialize)
 957   DEFINE_CLASS_QUERY(Jump)
 958   DEFINE_CLASS_QUERY(JumpProj)
 959   DEFINE_CLASS_QUERY(LongCountedLoop)
 960   DEFINE_CLASS_QUERY(LongCountedLoopEnd)
 961   DEFINE_CLASS_QUERY(Load)
 962   DEFINE_CLASS_QUERY(LoadStore)
 963   DEFINE_CLASS_QUERY(LoadStoreConditional)
 964   DEFINE_CLASS_QUERY(Lock)
 965   DEFINE_CLASS_QUERY(Loop)
 966   DEFINE_CLASS_QUERY(LShift)
 967   DEFINE_CLASS_QUERY(Mach)
 968   DEFINE_CLASS_QUERY(MachBranch)
 969   DEFINE_CLASS_QUERY(MachCall)
 970   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 971   DEFINE_CLASS_QUERY(MachCallJava)
 972   DEFINE_CLASS_QUERY(MachCallLeaf)
 973   DEFINE_CLASS_QUERY(MachCallRuntime)
 974   DEFINE_CLASS_QUERY(MachCallStaticJava)
 975   DEFINE_CLASS_QUERY(MachConstantBase)
 976   DEFINE_CLASS_QUERY(MachConstant)
 977   DEFINE_CLASS_QUERY(MachGoto)
 978   DEFINE_CLASS_QUERY(MachIf)
 979   DEFINE_CLASS_QUERY(MachJump)
 980   DEFINE_CLASS_QUERY(MachNullCheck)
 981   DEFINE_CLASS_QUERY(MachProj)

 982   DEFINE_CLASS_QUERY(MachReturn)
 983   DEFINE_CLASS_QUERY(MachSafePoint)
 984   DEFINE_CLASS_QUERY(MachSpillCopy)
 985   DEFINE_CLASS_QUERY(MachTemp)
 986   DEFINE_CLASS_QUERY(MachMemBar)
 987   DEFINE_CLASS_QUERY(MachMerge)

 988   DEFINE_CLASS_QUERY(Mem)
 989   DEFINE_CLASS_QUERY(MemBar)
 990   DEFINE_CLASS_QUERY(MemBarStoreStore)
 991   DEFINE_CLASS_QUERY(MergeMem)
 992   DEFINE_CLASS_QUERY(MinMax)
 993   DEFINE_CLASS_QUERY(Move)
 994   DEFINE_CLASS_QUERY(Mul)
 995   DEFINE_CLASS_QUERY(Multi)
 996   DEFINE_CLASS_QUERY(MultiBranch)
 997   DEFINE_CLASS_QUERY(MulVL)
 998   DEFINE_CLASS_QUERY(NarrowMemProj)
 999   DEFINE_CLASS_QUERY(Neg)
1000   DEFINE_CLASS_QUERY(NegV)
1001   DEFINE_CLASS_QUERY(NeverBranch)
1002   DEFINE_CLASS_QUERY(Opaque1)
1003   DEFINE_CLASS_QUERY(OpaqueConstantBool)
1004   DEFINE_CLASS_QUERY(OpaqueInitializedAssertionPredicate)
1005   DEFINE_CLASS_QUERY(OpaqueTemplateAssertionPredicate)
1006   DEFINE_CLASS_QUERY(OpaqueLoopInit)
1007   DEFINE_CLASS_QUERY(OpaqueLoopStride)
1008   DEFINE_CLASS_QUERY(OpaqueMultiversioning)
1009   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
1010   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
1011   DEFINE_CLASS_QUERY(Parm)
1012   DEFINE_CLASS_QUERY(ParsePredicate)
1013   DEFINE_CLASS_QUERY(PCTable)
1014   DEFINE_CLASS_QUERY(Phi)
1015   DEFINE_CLASS_QUERY(Proj)
1016   DEFINE_CLASS_QUERY(Reduction)
1017   DEFINE_CLASS_QUERY(Region)
1018   DEFINE_CLASS_QUERY(Root)
1019   DEFINE_CLASS_QUERY(SafePoint)
1020   DEFINE_CLASS_QUERY(SafePointScalarObject)
1021   DEFINE_CLASS_QUERY(SafePointScalarMerge)
1022   DEFINE_CLASS_QUERY(Start)
1023   DEFINE_CLASS_QUERY(Store)
1024   DEFINE_CLASS_QUERY(Sub)
1025   DEFINE_CLASS_QUERY(SubTypeCheck)
1026   DEFINE_CLASS_QUERY(Type)



1027   DEFINE_CLASS_QUERY(Vector)
1028   DEFINE_CLASS_QUERY(VectorMaskCmp)
1029   DEFINE_CLASS_QUERY(VectorUnbox)
1030   DEFINE_CLASS_QUERY(VectorReinterpret)
1031   DEFINE_CLASS_QUERY(CompressV)
1032   DEFINE_CLASS_QUERY(ExpandV)
1033   DEFINE_CLASS_QUERY(CompressM)
1034   DEFINE_CLASS_QUERY(LoadVector)
1035   DEFINE_CLASS_QUERY(LoadVectorGather)
1036   DEFINE_CLASS_QUERY(LoadVectorMasked)
1037   DEFINE_CLASS_QUERY(LoadVectorGatherMasked)
1038   DEFINE_CLASS_QUERY(StoreVector)
1039   DEFINE_CLASS_QUERY(StoreVectorScatter)
1040   DEFINE_CLASS_QUERY(StoreVectorMasked)
1041   DEFINE_CLASS_QUERY(StoreVectorScatterMasked)
1042   DEFINE_CLASS_QUERY(SaturatingVector)
1043   DEFINE_CLASS_QUERY(ShiftV)
1044   DEFINE_CLASS_QUERY(Unlock)
1045 
1046   #undef DEFINE_CLASS_QUERY

1300   // Determine if a node is a counted loop induction variable.
1301   // NOTE: The method is defined in "loopnode.cpp".
1302   bool is_cloop_ind_var() const;
1303 
1304   // Return a node with opcode "opc" and same inputs as "this" if one can
1305   // be found; Otherwise return null;
1306   Node* find_similar(int opc);
1307   bool has_same_inputs_as(const Node* other) const;
1308 
1309   // Return the unique control out if only one. Null if none or more than one.
1310   Node* unique_ctrl_out_or_null() const;
1311   // Return the unique control out. Asserts if none or more than one control out.
1312   Node* unique_ctrl_out() const;
1313 
1314   // Set control or add control as precedence edge
1315   void ensure_control_or_add_prec(Node* c);
1316   void add_prec_from(Node* n);
1317 
1318   // Visit boundary uses of the node and apply a callback function for each.
1319   // Recursively traverse uses, stopping and applying the callback when
1320   // reaching a boundary node, defined by is_boundary. Note: the function
1321   // definition appears after the complete type definition of Node_List.


1322   template <typename Callback, typename Check>
1323   void visit_uses(Callback callback, Check is_boundary) const;
1324 
1325   //----------------- Code Generation
1326 
1327   // Ideal register class for Matching.  Zero means unmatched instruction
1328   // (these are cloned instead of converted to machine nodes).
1329   virtual uint ideal_reg() const;
1330 
1331   static const uint NotAMachineReg;   // must be > max. machine register
1332 
1333   // Do we Match on this edge index or not?  Generally false for Control
1334   // and true for everything else.  Weird for calls & returns.
1335   virtual uint match_edge(uint idx) const;
1336 
1337   // Register class output is returned in
1338   virtual const RegMask &out_RegMask() const;
1339   // Register class input is expected in
1340   virtual const RegMask &in_RegMask(uint) const;
1341   // Should we clone rather than spill this instruction?
1342   bool rematerialize() const;
1343 

1820   void remove( uint i ) { Node_Array::remove(i); _cnt--; }
1821   void push( Node *b ) { map(_cnt++,b); }
1822   void yank( Node *n );         // Find and remove
1823   Node *pop() { return _nodes[--_cnt]; }
1824   void clear() { _cnt = 0; Node_Array::clear(); } // retain storage
1825   void copy(const Node_List& from) {
1826     if (from._max > _max) {
1827       grow(from._max);
1828     }
1829     _cnt = from._cnt;
1830     Copy::conjoint_words_to_higher((HeapWord*)&from._nodes[0], (HeapWord*)&_nodes[0], from._max * sizeof(Node*));
1831   }
1832 
1833   uint size() const { return _cnt; }
1834   void dump() const;
1835   void dump_simple() const;
1836 };
1837 
1838 // Definition must appear after complete type definition of Node_List
1839 template <typename Callback, typename Check>
1840 void Node::visit_uses(Callback callback, Check is_boundary) const {
1841   ResourceMark rm;
1842   VectorSet visited;
1843   Node_List worklist;
1844 
1845   // The initial worklist consists of the direct uses
1846   for (DUIterator_Fast kmax, k = fast_outs(kmax); k < kmax; k++) {
1847     Node* out = fast_out(k);
1848     if (!visited.test_set(out->_idx)) { worklist.push(out); }
1849   }
1850 
1851   while (worklist.size() > 0) {
1852     Node* use = worklist.pop();
1853     // Apply callback on boundary nodes
1854     if (is_boundary(use)) {
1855       callback(use);
1856     } else {

1857       // Not a boundary node, continue search
1858       for (DUIterator_Fast kmax, k = use->fast_outs(kmax); k < kmax; k++) {
1859         Node* out = use->fast_out(k);
1860         if (!visited.test_set(out->_idx)) { worklist.push(out); }
1861       }
1862     }
1863   }
1864 }
1865 
1866 
1867 //------------------------------Unique_Node_List-------------------------------
1868 class Unique_Node_List : public Node_List {
1869   VectorSet _in_worklist;
1870   uint _clock_index;            // Index in list where to pop from next
1871 public:
1872   Unique_Node_List() : Node_List(), _clock_index(0) {}
1873   Unique_Node_List(Arena *a) : Node_List(a), _in_worklist(a), _clock_index(0) {}
1874 
1875   NONCOPYABLE(Unique_Node_List);
1876   Unique_Node_List& operator=(Unique_Node_List&&) = delete;

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

 170 class Pipeline;
 171 class PopulateIndexNode;
 172 class ProjNode;
 173 class RangeCheckNode;
 174 class ReductionNode;
 175 class RegMask;
 176 class RegionNode;
 177 class RootNode;
 178 class SafePointNode;
 179 class SafePointScalarObjectNode;
 180 class SafePointScalarMergeNode;
 181 class SaturatingVectorNode;
 182 class StartNode;
 183 class State;
 184 class StoreNode;
 185 class SubNode;
 186 class SubTypeCheckNode;
 187 class Type;
 188 class TypeNode;
 189 class UnlockNode;
 190 class InlineTypeNode;
 191 class LoadFlatNode;
 192 class StoreFlatNode;
 193 class VectorNode;
 194 class LoadVectorNode;
 195 class LoadVectorMaskedNode;
 196 class StoreVectorMaskedNode;
 197 class LoadVectorGatherNode;
 198 class LoadVectorGatherMaskedNode;
 199 class StoreVectorNode;
 200 class StoreVectorScatterNode;
 201 class StoreVectorScatterMaskedNode;
 202 class VerifyVectorAlignmentNode;
 203 class VectorMaskCmpNode;
 204 class VectorUnboxNode;
 205 class VectorSet;
 206 class VectorReinterpretNode;
 207 class ShiftVNode;
 208 class MulVLNode;
 209 class ExpandVNode;
 210 class CompressVNode;
 211 class CompressMNode;
 212 class C2_MacroAssembler;

 679     Bit_Node   = 0x00000000,
 680     Class_Node = 0x00000000,
 681     ClassMask_Node = 0xFFFFFFFF,
 682 
 683     DEFINE_CLASS_ID(Multi, Node, 0)
 684       DEFINE_CLASS_ID(SafePoint, Multi, 0)
 685         DEFINE_CLASS_ID(Call,      SafePoint, 0)
 686           DEFINE_CLASS_ID(CallJava,         Call, 0)
 687             DEFINE_CLASS_ID(CallStaticJava,   CallJava, 0)
 688             DEFINE_CLASS_ID(CallDynamicJava,  CallJava, 1)
 689           DEFINE_CLASS_ID(CallRuntime,      Call, 1)
 690             DEFINE_CLASS_ID(CallLeaf,         CallRuntime, 0)
 691               DEFINE_CLASS_ID(CallLeafNoFP,     CallLeaf, 0)
 692               DEFINE_CLASS_ID(CallLeafPure,     CallLeaf, 1)
 693           DEFINE_CLASS_ID(Allocate,         Call, 2)
 694             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 695           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 696             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 697             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 698           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 699         DEFINE_CLASS_ID(LoadFlat,  SafePoint, 1)
 700         DEFINE_CLASS_ID(StoreFlat, SafePoint, 2)
 701       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 702         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 703           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 704           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 705         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 706           DEFINE_CLASS_ID(BaseCountedLoopEnd,     If, 0)
 707             DEFINE_CLASS_ID(CountedLoopEnd,       BaseCountedLoopEnd, 0)
 708             DEFINE_CLASS_ID(LongCountedLoopEnd,   BaseCountedLoopEnd, 1)
 709           DEFINE_CLASS_ID(RangeCheck,             If, 1)
 710           DEFINE_CLASS_ID(OuterStripMinedLoopEnd, If, 2)
 711           DEFINE_CLASS_ID(ParsePredicate,         If, 3)
 712         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 713       DEFINE_CLASS_ID(Start,       Multi, 2)
 714       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 715         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 716         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 717         DEFINE_CLASS_ID(Blackhole,        MemBar, 2)
 718 
 719     DEFINE_CLASS_ID(Mach,  Node, 1)
 720       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 721         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 722           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 723             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 724               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 725               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 726             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 727               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 728       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 729         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 730         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 731         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 732       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 733       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 734       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 735       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 736         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 737       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 738       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 739       DEFINE_CLASS_ID(MachProlog,       Mach, 8)
 740       DEFINE_CLASS_ID(MachVEP,          Mach, 9)
 741 
 742     DEFINE_CLASS_ID(Type,  Node, 2)
 743       DEFINE_CLASS_ID(Phi,   Type, 0)
 744       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 745         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 746         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 747         DEFINE_CLASS_ID(CastLL, ConstraintCast, 2)
 748         DEFINE_CLASS_ID(CastFF, ConstraintCast, 3)
 749         DEFINE_CLASS_ID(CastDD, ConstraintCast, 4)
 750         DEFINE_CLASS_ID(CastVV, ConstraintCast, 5)
 751         DEFINE_CLASS_ID(CastPP, ConstraintCast, 6)
 752         DEFINE_CLASS_ID(CastHH, ConstraintCast, 7)
 753       DEFINE_CLASS_ID(CMove, Type, 3)
 754       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 755       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 756         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 757         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 758       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 759         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 760         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 761       DEFINE_CLASS_ID(Vector, Type, 7)
 762         DEFINE_CLASS_ID(VectorMaskCmp, Vector, 0)
 763         DEFINE_CLASS_ID(VectorUnbox, Vector, 1)
 764         DEFINE_CLASS_ID(VectorReinterpret, Vector, 2)
 765         DEFINE_CLASS_ID(ShiftV, Vector, 3)
 766         DEFINE_CLASS_ID(CompressV, Vector, 4)
 767         DEFINE_CLASS_ID(ExpandV, Vector, 5)
 768         DEFINE_CLASS_ID(CompressM, Vector, 6)
 769         DEFINE_CLASS_ID(Reduction, Vector, 7)
 770         DEFINE_CLASS_ID(NegV, Vector, 8)
 771         DEFINE_CLASS_ID(SaturatingVector, Vector, 9)
 772         DEFINE_CLASS_ID(MulVL, Vector, 10)
 773       DEFINE_CLASS_ID(InlineType, Type, 8)
 774       DEFINE_CLASS_ID(Con, Type, 9)
 775           DEFINE_CLASS_ID(ConI, Con, 0)
 776       DEFINE_CLASS_ID(SafePointScalarMerge, Type, 10)
 777       DEFINE_CLASS_ID(Convert, Type, 11)
 778 
 779 
 780     DEFINE_CLASS_ID(Proj,  Node, 3)
 781       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 782       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 783       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 784         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 785         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 786       DEFINE_CLASS_ID(Parm,      Proj, 4)
 787       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 788       DEFINE_CLASS_ID(NarrowMemProj, Proj, 6)
 789 
 790     DEFINE_CLASS_ID(Mem, Node, 4)
 791       DEFINE_CLASS_ID(Load, Mem, 0)
 792         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 793           DEFINE_CLASS_ID(LoadVectorGather, LoadVector, 0)
 794           DEFINE_CLASS_ID(LoadVectorGatherMasked, LoadVector, 1)
 795           DEFINE_CLASS_ID(LoadVectorMasked, LoadVector, 2)
 796       DEFINE_CLASS_ID(Store, Mem, 1)
 797         DEFINE_CLASS_ID(StoreVector, Store, 0)
 798           DEFINE_CLASS_ID(StoreVectorScatter, StoreVector, 0)
 799           DEFINE_CLASS_ID(StoreVectorScatterMasked, StoreVector, 1)
 800           DEFINE_CLASS_ID(StoreVectorMasked, StoreVector, 2)
 801       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 802         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 803           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 804         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)
 805 
 806     DEFINE_CLASS_ID(Region, Node, 5)
 807       DEFINE_CLASS_ID(Loop, Region, 0)
 808         DEFINE_CLASS_ID(Root,                Loop, 0)
 809         DEFINE_CLASS_ID(BaseCountedLoop,     Loop, 1)
 810           DEFINE_CLASS_ID(CountedLoop,       BaseCountedLoop, 0)
 811           DEFINE_CLASS_ID(LongCountedLoop,   BaseCountedLoop, 1)
 812         DEFINE_CLASS_ID(OuterStripMinedLoop, Loop, 2)
 813 
 814     DEFINE_CLASS_ID(Sub,   Node, 6)
 815       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 816         DEFINE_CLASS_ID(FastLock,       Cmp, 0)
 817         DEFINE_CLASS_ID(FastUnlock,     Cmp, 1)
 818         DEFINE_CLASS_ID(SubTypeCheck,   Cmp, 2)
 819         DEFINE_CLASS_ID(FlatArrayCheck, Cmp, 3)
 820 
 821     DEFINE_CLASS_ID(MergeMem, Node, 7)
 822     DEFINE_CLASS_ID(Bool,     Node, 8)
 823     DEFINE_CLASS_ID(AddP,     Node, 9)
 824     DEFINE_CLASS_ID(BoxLock,  Node, 10)
 825     DEFINE_CLASS_ID(Add,      Node, 11)
 826       DEFINE_CLASS_ID(MinMax,      Add, 0)
 827     DEFINE_CLASS_ID(Mul,      Node, 12)
 828     DEFINE_CLASS_ID(ClearArray, Node, 14)
 829     DEFINE_CLASS_ID(Halt,     Node, 15)
 830     DEFINE_CLASS_ID(Opaque1,  Node, 16)
 831       DEFINE_CLASS_ID(OpaqueLoopInit, Opaque1, 0)
 832       DEFINE_CLASS_ID(OpaqueLoopStride, Opaque1, 1)
 833       DEFINE_CLASS_ID(OpaqueMultiversioning, Opaque1, 2)
 834     DEFINE_CLASS_ID(OpaqueConstantBool,  Node, 17)
 835     DEFINE_CLASS_ID(OpaqueInitializedAssertionPredicate,  Node, 18)
 836     DEFINE_CLASS_ID(OpaqueTemplateAssertionPredicate,  Node, 19)
 837     DEFINE_CLASS_ID(Move,     Node, 20)
 838     DEFINE_CLASS_ID(LShift,   Node, 21)
 839     DEFINE_CLASS_ID(Neg,      Node, 22)

 910   #define DEFINE_CLASS_QUERY(type)                           \
 911   bool is_##type() const {                                   \
 912     return ((_class_id & ClassMask_##type) == Class_##type); \
 913   }                                                          \
 914   type##Node *as_##type() const {                            \
 915     assert(is_##type(), "invalid node class: %s", Name());   \
 916     return (type##Node*)this;                                \
 917   }                                                          \
 918   type##Node* isa_##type() const {                           \
 919     return (is_##type()) ? as_##type() : nullptr;            \
 920   }
 921 
 922   DEFINE_CLASS_QUERY(AbstractLock)
 923   DEFINE_CLASS_QUERY(Add)
 924   DEFINE_CLASS_QUERY(AddP)
 925   DEFINE_CLASS_QUERY(Allocate)
 926   DEFINE_CLASS_QUERY(AllocateArray)
 927   DEFINE_CLASS_QUERY(ArrayCopy)
 928   DEFINE_CLASS_QUERY(BaseCountedLoop)
 929   DEFINE_CLASS_QUERY(BaseCountedLoopEnd)
 930   DEFINE_CLASS_QUERY(Blackhole)
 931   DEFINE_CLASS_QUERY(Bool)
 932   DEFINE_CLASS_QUERY(BoxLock)
 933   DEFINE_CLASS_QUERY(Call)
 934   DEFINE_CLASS_QUERY(CallDynamicJava)
 935   DEFINE_CLASS_QUERY(CallJava)
 936   DEFINE_CLASS_QUERY(CallLeaf)
 937   DEFINE_CLASS_QUERY(CallLeafNoFP)
 938   DEFINE_CLASS_QUERY(CallLeafPure)
 939   DEFINE_CLASS_QUERY(CallRuntime)
 940   DEFINE_CLASS_QUERY(CallStaticJava)
 941   DEFINE_CLASS_QUERY(Catch)
 942   DEFINE_CLASS_QUERY(CatchProj)
 943   DEFINE_CLASS_QUERY(CheckCastPP)
 944   DEFINE_CLASS_QUERY(CastII)
 945   DEFINE_CLASS_QUERY(CastLL)
 946   DEFINE_CLASS_QUERY(CastFF)
 947   DEFINE_CLASS_QUERY(ConI)
 948   DEFINE_CLASS_QUERY(CastPP)
 949   DEFINE_CLASS_QUERY(ConstraintCast)
 950   DEFINE_CLASS_QUERY(ClearArray)
 951   DEFINE_CLASS_QUERY(CMove)
 952   DEFINE_CLASS_QUERY(Cmp)
 953   DEFINE_CLASS_QUERY(Convert)
 954   DEFINE_CLASS_QUERY(CountedLoop)
 955   DEFINE_CLASS_QUERY(CountedLoopEnd)
 956   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 957   DEFINE_CLASS_QUERY(DecodeN)
 958   DEFINE_CLASS_QUERY(DecodeNKlass)
 959   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 960   DEFINE_CLASS_QUERY(EncodeP)
 961   DEFINE_CLASS_QUERY(EncodePKlass)
 962   DEFINE_CLASS_QUERY(FastLock)
 963   DEFINE_CLASS_QUERY(FastUnlock)
 964   DEFINE_CLASS_QUERY(FlatArrayCheck)
 965   DEFINE_CLASS_QUERY(Halt)
 966   DEFINE_CLASS_QUERY(If)
 967   DEFINE_CLASS_QUERY(RangeCheck)
 968   DEFINE_CLASS_QUERY(IfProj)
 969   DEFINE_CLASS_QUERY(IfFalse)
 970   DEFINE_CLASS_QUERY(IfTrue)
 971   DEFINE_CLASS_QUERY(Initialize)
 972   DEFINE_CLASS_QUERY(Jump)
 973   DEFINE_CLASS_QUERY(JumpProj)
 974   DEFINE_CLASS_QUERY(LongCountedLoop)
 975   DEFINE_CLASS_QUERY(LongCountedLoopEnd)
 976   DEFINE_CLASS_QUERY(Load)
 977   DEFINE_CLASS_QUERY(LoadStore)
 978   DEFINE_CLASS_QUERY(LoadStoreConditional)
 979   DEFINE_CLASS_QUERY(Lock)
 980   DEFINE_CLASS_QUERY(Loop)
 981   DEFINE_CLASS_QUERY(LShift)
 982   DEFINE_CLASS_QUERY(Mach)
 983   DEFINE_CLASS_QUERY(MachBranch)
 984   DEFINE_CLASS_QUERY(MachCall)
 985   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 986   DEFINE_CLASS_QUERY(MachCallJava)
 987   DEFINE_CLASS_QUERY(MachCallLeaf)
 988   DEFINE_CLASS_QUERY(MachCallRuntime)
 989   DEFINE_CLASS_QUERY(MachCallStaticJava)
 990   DEFINE_CLASS_QUERY(MachConstantBase)
 991   DEFINE_CLASS_QUERY(MachConstant)
 992   DEFINE_CLASS_QUERY(MachGoto)
 993   DEFINE_CLASS_QUERY(MachIf)
 994   DEFINE_CLASS_QUERY(MachJump)
 995   DEFINE_CLASS_QUERY(MachNullCheck)
 996   DEFINE_CLASS_QUERY(MachProj)
 997   DEFINE_CLASS_QUERY(MachProlog)
 998   DEFINE_CLASS_QUERY(MachReturn)
 999   DEFINE_CLASS_QUERY(MachSafePoint)
1000   DEFINE_CLASS_QUERY(MachSpillCopy)
1001   DEFINE_CLASS_QUERY(MachTemp)
1002   DEFINE_CLASS_QUERY(MachMemBar)
1003   DEFINE_CLASS_QUERY(MachMerge)
1004   DEFINE_CLASS_QUERY(MachVEP)
1005   DEFINE_CLASS_QUERY(Mem)
1006   DEFINE_CLASS_QUERY(MemBar)
1007   DEFINE_CLASS_QUERY(MemBarStoreStore)
1008   DEFINE_CLASS_QUERY(MergeMem)
1009   DEFINE_CLASS_QUERY(MinMax)
1010   DEFINE_CLASS_QUERY(Move)
1011   DEFINE_CLASS_QUERY(Mul)
1012   DEFINE_CLASS_QUERY(Multi)
1013   DEFINE_CLASS_QUERY(MultiBranch)
1014   DEFINE_CLASS_QUERY(MulVL)
1015   DEFINE_CLASS_QUERY(NarrowMemProj)
1016   DEFINE_CLASS_QUERY(Neg)
1017   DEFINE_CLASS_QUERY(NegV)
1018   DEFINE_CLASS_QUERY(NeverBranch)
1019   DEFINE_CLASS_QUERY(Opaque1)
1020   DEFINE_CLASS_QUERY(OpaqueConstantBool)
1021   DEFINE_CLASS_QUERY(OpaqueInitializedAssertionPredicate)
1022   DEFINE_CLASS_QUERY(OpaqueTemplateAssertionPredicate)
1023   DEFINE_CLASS_QUERY(OpaqueLoopInit)
1024   DEFINE_CLASS_QUERY(OpaqueLoopStride)
1025   DEFINE_CLASS_QUERY(OpaqueMultiversioning)
1026   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
1027   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
1028   DEFINE_CLASS_QUERY(Parm)
1029   DEFINE_CLASS_QUERY(ParsePredicate)
1030   DEFINE_CLASS_QUERY(PCTable)
1031   DEFINE_CLASS_QUERY(Phi)
1032   DEFINE_CLASS_QUERY(Proj)
1033   DEFINE_CLASS_QUERY(Reduction)
1034   DEFINE_CLASS_QUERY(Region)
1035   DEFINE_CLASS_QUERY(Root)
1036   DEFINE_CLASS_QUERY(SafePoint)
1037   DEFINE_CLASS_QUERY(SafePointScalarObject)
1038   DEFINE_CLASS_QUERY(SafePointScalarMerge)
1039   DEFINE_CLASS_QUERY(Start)
1040   DEFINE_CLASS_QUERY(Store)
1041   DEFINE_CLASS_QUERY(Sub)
1042   DEFINE_CLASS_QUERY(SubTypeCheck)
1043   DEFINE_CLASS_QUERY(Type)
1044   DEFINE_CLASS_QUERY(InlineType)
1045   DEFINE_CLASS_QUERY(LoadFlat)
1046   DEFINE_CLASS_QUERY(StoreFlat)
1047   DEFINE_CLASS_QUERY(Vector)
1048   DEFINE_CLASS_QUERY(VectorMaskCmp)
1049   DEFINE_CLASS_QUERY(VectorUnbox)
1050   DEFINE_CLASS_QUERY(VectorReinterpret)
1051   DEFINE_CLASS_QUERY(CompressV)
1052   DEFINE_CLASS_QUERY(ExpandV)
1053   DEFINE_CLASS_QUERY(CompressM)
1054   DEFINE_CLASS_QUERY(LoadVector)
1055   DEFINE_CLASS_QUERY(LoadVectorGather)
1056   DEFINE_CLASS_QUERY(LoadVectorMasked)
1057   DEFINE_CLASS_QUERY(LoadVectorGatherMasked)
1058   DEFINE_CLASS_QUERY(StoreVector)
1059   DEFINE_CLASS_QUERY(StoreVectorScatter)
1060   DEFINE_CLASS_QUERY(StoreVectorMasked)
1061   DEFINE_CLASS_QUERY(StoreVectorScatterMasked)
1062   DEFINE_CLASS_QUERY(SaturatingVector)
1063   DEFINE_CLASS_QUERY(ShiftV)
1064   DEFINE_CLASS_QUERY(Unlock)
1065 
1066   #undef DEFINE_CLASS_QUERY

1320   // Determine if a node is a counted loop induction variable.
1321   // NOTE: The method is defined in "loopnode.cpp".
1322   bool is_cloop_ind_var() const;
1323 
1324   // Return a node with opcode "opc" and same inputs as "this" if one can
1325   // be found; Otherwise return null;
1326   Node* find_similar(int opc);
1327   bool has_same_inputs_as(const Node* other) const;
1328 
1329   // Return the unique control out if only one. Null if none or more than one.
1330   Node* unique_ctrl_out_or_null() const;
1331   // Return the unique control out. Asserts if none or more than one control out.
1332   Node* unique_ctrl_out() const;
1333 
1334   // Set control or add control as precedence edge
1335   void ensure_control_or_add_prec(Node* c);
1336   void add_prec_from(Node* n);
1337 
1338   // Visit boundary uses of the node and apply a callback function for each.
1339   // Recursively traverse uses, stopping and applying the callback when
1340   // reaching a boundary node, defined by is_boundary. If callback_on_all is true,
1341   // it applies the callback on all the nodes seen, and not only on the boundary
1342   // nodes. Note: the function definition appears after the complete type
1343   // definition of Node_List.
1344   template <typename Callback, typename Check>
1345   void visit_uses(Callback callback, Check is_boundary, bool always_callback = false) const;
1346 
1347   //----------------- Code Generation
1348 
1349   // Ideal register class for Matching.  Zero means unmatched instruction
1350   // (these are cloned instead of converted to machine nodes).
1351   virtual uint ideal_reg() const;
1352 
1353   static const uint NotAMachineReg;   // must be > max. machine register
1354 
1355   // Do we Match on this edge index or not?  Generally false for Control
1356   // and true for everything else.  Weird for calls & returns.
1357   virtual uint match_edge(uint idx) const;
1358 
1359   // Register class output is returned in
1360   virtual const RegMask &out_RegMask() const;
1361   // Register class input is expected in
1362   virtual const RegMask &in_RegMask(uint) const;
1363   // Should we clone rather than spill this instruction?
1364   bool rematerialize() const;
1365 

1842   void remove( uint i ) { Node_Array::remove(i); _cnt--; }
1843   void push( Node *b ) { map(_cnt++,b); }
1844   void yank( Node *n );         // Find and remove
1845   Node *pop() { return _nodes[--_cnt]; }
1846   void clear() { _cnt = 0; Node_Array::clear(); } // retain storage
1847   void copy(const Node_List& from) {
1848     if (from._max > _max) {
1849       grow(from._max);
1850     }
1851     _cnt = from._cnt;
1852     Copy::conjoint_words_to_higher((HeapWord*)&from._nodes[0], (HeapWord*)&_nodes[0], from._max * sizeof(Node*));
1853   }
1854 
1855   uint size() const { return _cnt; }
1856   void dump() const;
1857   void dump_simple() const;
1858 };
1859 
1860 // Definition must appear after complete type definition of Node_List
1861 template <typename Callback, typename Check>
1862 void Node::visit_uses(Callback callback, Check is_boundary, bool always_callback) const {
1863   ResourceMark rm;
1864   VectorSet visited;
1865   Node_List worklist;
1866 
1867   // The initial worklist consists of the direct uses
1868   for (DUIterator_Fast kmax, k = fast_outs(kmax); k < kmax; k++) {
1869     Node* out = fast_out(k);
1870     if (!visited.test_set(out->_idx)) { worklist.push(out); }
1871   }
1872 
1873   while (worklist.size() > 0) {
1874     Node* use = worklist.pop();
1875     bool boundary = is_boundary(use);
1876     if (boundary || always_callback) {
1877       callback(use);
1878     }
1879     if (!boundary) {
1880       // Not a boundary node, continue search
1881       for (DUIterator_Fast kmax, k = use->fast_outs(kmax); k < kmax; k++) {
1882         Node* out = use->fast_out(k);
1883         if (!visited.test_set(out->_idx)) { worklist.push(out); }
1884       }
1885     }
1886   }
1887 }
1888 
1889 
1890 //------------------------------Unique_Node_List-------------------------------
1891 class Unique_Node_List : public Node_List {
1892   VectorSet _in_worklist;
1893   uint _clock_index;            // Index in list where to pop from next
1894 public:
1895   Unique_Node_List() : Node_List(), _clock_index(0) {}
1896   Unique_Node_List(Arena *a) : Node_List(a), _in_worklist(a), _clock_index(0) {}
1897 
1898   NONCOPYABLE(Unique_Node_List);
1899   Unique_Node_List& operator=(Unique_Node_List&&) = delete;
< prev index next >