< prev index next >

src/share/vm/opto/node.hpp

Print this page




  54 class CatchNode;
  55 class CatchProjNode;
  56 class CheckCastPPNode;
  57 class CastIINode;
  58 class ClearArrayNode;
  59 class CmpNode;
  60 class CodeBuffer;
  61 class ConstraintCastNode;
  62 class ConNode;
  63 class CountedLoopNode;
  64 class CountedLoopEndNode;
  65 class DecodeNarrowPtrNode;
  66 class DecodeNNode;
  67 class DecodeNKlassNode;
  68 class EncodeNarrowPtrNode;
  69 class EncodePNode;
  70 class EncodePKlassNode;
  71 class FastLockNode;
  72 class FastUnlockNode;
  73 class IfNode;

  74 class IfFalseNode;
  75 class IfTrueNode;
  76 class InitializeNode;
  77 class JVMState;
  78 class JumpNode;
  79 class JumpProjNode;
  80 class LoadNode;
  81 class LoadStoreNode;
  82 class LockNode;
  83 class LoopNode;
  84 class MachBranchNode;
  85 class MachCallDynamicJavaNode;
  86 class MachCallJavaNode;
  87 class MachCallLeafNode;
  88 class MachCallNode;
  89 class MachCallRuntimeNode;
  90 class MachCallStaticJavaNode;
  91 class MachConstantBaseNode;
  92 class MachConstantNode;
  93 class MachGotoNode;
  94 class MachIfNode;
  95 class MachNode;
  96 class MachNullCheckNode;
  97 class MachProjNode;
  98 class MachReturnNode;
  99 class MachSafePointNode;
 100 class MachSpillCopyNode;
 101 class MachTempNode;
 102 class MachMergeNode;

 103 class Matcher;
 104 class MemBarNode;
 105 class MemBarStoreStoreNode;
 106 class MemNode;
 107 class MergeMemNode;
 108 class MulNode;
 109 class MultiNode;
 110 class MultiBranchNode;
 111 class NeverBranchNode;
 112 class Node;
 113 class Node_Array;
 114 class Node_List;
 115 class Node_Stack;
 116 class NullCheckNode;
 117 class OopMap;
 118 class ParmNode;
 119 class PCTableNode;
 120 class PhaseCCP;
 121 class PhaseGVN;
 122 class PhaseIterGVN;
 123 class PhaseRegAlloc;
 124 class PhaseTransform;
 125 class PhaseValues;
 126 class PhiNode;
 127 class Pipeline;
 128 class ProjNode;
 129 class RegMask;
 130 class RegionNode;
 131 class RootNode;
 132 class SafePointNode;
 133 class SafePointScalarObjectNode;

 134 class StartNode;
 135 class State;
 136 class StoreNode;
 137 class SubNode;
 138 class Type;
 139 class TypeNode;
 140 class UnlockNode;
 141 class VectorNode;
 142 class LoadVectorNode;
 143 class StoreVectorNode;
 144 class VectorSet;
 145 typedef void (*NFunc)(Node&,void*);
 146 extern "C" {
 147   typedef int (*C_sort_func_t)(const void *, const void *);
 148 }
 149 
 150 // The type of all node counts and indexes.
 151 // It must hold at least 16 bits, but must also be fast to load and store.
 152 // This type, if less than 32 bits, could limit the number of possible nodes.
 153 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)


 436   int replace_edge(Node* old, Node* neww);
 437   int replace_edges_in_range(Node* old, Node* neww, int start, int end);
 438   // NULL out all inputs to eliminate incoming Def-Use edges.
 439   // Return the number of edges between 'n' and 'this'
 440   int  disconnect_inputs(Node *n, Compile *c);
 441 
 442   // Quickly, return true if and only if I am Compile::current()->top().
 443   bool is_top() const {
 444     assert((this == (Node*) Compile::current()->top()) == (_out == NULL), "");
 445     return (_out == NULL);
 446   }
 447   // Reaffirm invariants for is_top.  (Only from Compile::set_cached_top_node.)
 448   void setup_is_top();
 449 
 450   // Strip away casting.  (It is depth-limited.)
 451   Node* uncast() const;
 452   // Return whether two Nodes are equivalent, after stripping casting.
 453   bool eqv_uncast(const Node* n) const {
 454     return (this->uncast() == n->uncast());
 455   }


 456 
 457   // Find out of current node that matches opcode.
 458   Node* find_out_with(int opcode);
 459 
 460 private:
 461   static Node* uncast_helper(const Node* n);
 462 
 463   // Add an output edge to the end of the list
 464   void add_out( Node *n ) {
 465     if (is_top())  return;
 466     if( _outcnt == _outmax ) out_grow(_outcnt);
 467     _out[_outcnt++] = n;
 468   }
 469   // Delete an output edge
 470   void del_out( Node *n ) {
 471     if (is_top())  return;
 472     Node** outp = &_out[_outcnt];
 473     // Find and remove n
 474     do {
 475       assert(outp > _out, "Missing Def-Use edge");


 619         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 620 
 621     DEFINE_CLASS_ID(Mach,  Node, 1)
 622       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 623         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 624           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 625             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 626               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 627               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 628             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 629               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 630       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 631         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 632         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 633         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 634       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 635       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 636       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 637       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 638       DEFINE_CLASS_ID(MachMerge,        Mach, 6)

 639 
 640     DEFINE_CLASS_ID(Type,  Node, 2)
 641       DEFINE_CLASS_ID(Phi,   Type, 0)
 642       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 643         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 644       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
 645       DEFINE_CLASS_ID(CMove, Type, 3)
 646       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 647       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 648         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 649         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 650       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 651         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 652         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)

 653 
 654     DEFINE_CLASS_ID(Proj,  Node, 3)
 655       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 656       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 657       DEFINE_CLASS_ID(IfTrue,    Proj, 2)
 658       DEFINE_CLASS_ID(IfFalse,   Proj, 3)

 659       DEFINE_CLASS_ID(Parm,      Proj, 4)
 660       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 661 
 662     DEFINE_CLASS_ID(Mem,   Node, 4)
 663       DEFINE_CLASS_ID(Load,  Mem, 0)
 664         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 665       DEFINE_CLASS_ID(Store, Mem, 1)
 666         DEFINE_CLASS_ID(StoreVector, Store, 0)
 667       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 668 
 669     DEFINE_CLASS_ID(Region, Node, 5)
 670       DEFINE_CLASS_ID(Loop, Region, 0)
 671         DEFINE_CLASS_ID(Root,        Loop, 0)
 672         DEFINE_CLASS_ID(CountedLoop, Loop, 1)
 673 
 674     DEFINE_CLASS_ID(Sub,   Node, 6)
 675       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 676         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 677         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 678 


 764   DEFINE_CLASS_QUERY(CallStaticJava)
 765   DEFINE_CLASS_QUERY(Catch)
 766   DEFINE_CLASS_QUERY(CatchProj)
 767   DEFINE_CLASS_QUERY(CheckCastPP)
 768   DEFINE_CLASS_QUERY(CastII)
 769   DEFINE_CLASS_QUERY(ConstraintCast)
 770   DEFINE_CLASS_QUERY(ClearArray)
 771   DEFINE_CLASS_QUERY(CMove)
 772   DEFINE_CLASS_QUERY(Cmp)
 773   DEFINE_CLASS_QUERY(CountedLoop)
 774   DEFINE_CLASS_QUERY(CountedLoopEnd)
 775   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 776   DEFINE_CLASS_QUERY(DecodeN)
 777   DEFINE_CLASS_QUERY(DecodeNKlass)
 778   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 779   DEFINE_CLASS_QUERY(EncodeP)
 780   DEFINE_CLASS_QUERY(EncodePKlass)
 781   DEFINE_CLASS_QUERY(FastLock)
 782   DEFINE_CLASS_QUERY(FastUnlock)
 783   DEFINE_CLASS_QUERY(If)

 784   DEFINE_CLASS_QUERY(IfFalse)
 785   DEFINE_CLASS_QUERY(IfTrue)
 786   DEFINE_CLASS_QUERY(Initialize)
 787   DEFINE_CLASS_QUERY(Jump)
 788   DEFINE_CLASS_QUERY(JumpProj)
 789   DEFINE_CLASS_QUERY(Load)
 790   DEFINE_CLASS_QUERY(LoadStore)
 791   DEFINE_CLASS_QUERY(Lock)
 792   DEFINE_CLASS_QUERY(Loop)
 793   DEFINE_CLASS_QUERY(Mach)
 794   DEFINE_CLASS_QUERY(MachBranch)
 795   DEFINE_CLASS_QUERY(MachCall)
 796   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 797   DEFINE_CLASS_QUERY(MachCallJava)
 798   DEFINE_CLASS_QUERY(MachCallLeaf)
 799   DEFINE_CLASS_QUERY(MachCallRuntime)
 800   DEFINE_CLASS_QUERY(MachCallStaticJava)
 801   DEFINE_CLASS_QUERY(MachConstantBase)
 802   DEFINE_CLASS_QUERY(MachConstant)
 803   DEFINE_CLASS_QUERY(MachGoto)
 804   DEFINE_CLASS_QUERY(MachIf)
 805   DEFINE_CLASS_QUERY(MachNullCheck)
 806   DEFINE_CLASS_QUERY(MachProj)
 807   DEFINE_CLASS_QUERY(MachReturn)
 808   DEFINE_CLASS_QUERY(MachSafePoint)
 809   DEFINE_CLASS_QUERY(MachSpillCopy)
 810   DEFINE_CLASS_QUERY(MachTemp)

 811   DEFINE_CLASS_QUERY(MachMerge)
 812   DEFINE_CLASS_QUERY(Mem)
 813   DEFINE_CLASS_QUERY(MemBar)
 814   DEFINE_CLASS_QUERY(MemBarStoreStore)
 815   DEFINE_CLASS_QUERY(MergeMem)
 816   DEFINE_CLASS_QUERY(Mul)
 817   DEFINE_CLASS_QUERY(Multi)
 818   DEFINE_CLASS_QUERY(MultiBranch)
 819   DEFINE_CLASS_QUERY(Parm)
 820   DEFINE_CLASS_QUERY(PCTable)
 821   DEFINE_CLASS_QUERY(Phi)
 822   DEFINE_CLASS_QUERY(Proj)
 823   DEFINE_CLASS_QUERY(Region)
 824   DEFINE_CLASS_QUERY(Root)
 825   DEFINE_CLASS_QUERY(SafePoint)
 826   DEFINE_CLASS_QUERY(SafePointScalarObject)

 827   DEFINE_CLASS_QUERY(Start)
 828   DEFINE_CLASS_QUERY(Store)
 829   DEFINE_CLASS_QUERY(Sub)
 830   DEFINE_CLASS_QUERY(Type)
 831   DEFINE_CLASS_QUERY(Vector)
 832   DEFINE_CLASS_QUERY(LoadVector)
 833   DEFINE_CLASS_QUERY(StoreVector)
 834   DEFINE_CLASS_QUERY(Unlock)
 835 
 836   #undef DEFINE_CLASS_QUERY
 837 
 838   // duplicate of is_MachSpillCopy()
 839   bool is_SpillCopy () const {
 840     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 841   }
 842 
 843   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 844   // The data node which is safe to leave in dead loop during IGVN optimization.
 845   bool is_dead_loop_safe() const {
 846     return is_Phi() || (is_Proj() && in(0) == NULL) ||


 905   // Return the set of values this Node can take on at runtime.
 906   virtual const Type *Value( PhaseTransform *phase ) const;
 907 
 908   // Return a node which is more "ideal" than the current node.
 909   // The invariants on this call are subtle.  If in doubt, read the
 910   // treatise in node.cpp above the default implemention AND TEST WITH
 911   // +VerifyIterativeGVN!
 912   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 913 
 914   // Some nodes have specific Ideal subgraph transformations only if they are
 915   // unique users of specific nodes. Such nodes should be put on IGVN worklist
 916   // for the transformations to happen.
 917   bool has_special_unique_user() const;
 918 
 919   // Skip Proj and CatchProj nodes chains. Check for Null and Top.
 920   Node* find_exact_control(Node* ctrl);
 921 
 922   // Check if 'this' node dominates or equal to 'sub'.
 923   bool dominates(Node* sub, Node_List &nlist);
 924 




 925 protected:
 926   bool remove_dead_region(PhaseGVN *phase, bool can_reshape);
 927 public:
 928 
 929   // Idealize graph, using DU info.  Done after constant propagation
 930   virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
 931 
 932   // See if there is valid pipeline info
 933   static  const Pipeline *pipeline_class();
 934   virtual const Pipeline *pipeline() const;
 935 
 936   // Compute the latency from the def to this instruction of the ith input node
 937   uint latency(uint i);
 938 
 939   // Hash & compare functions, for pessimistic value numbering
 940 
 941   // If the hash function returns the special sentinel value NO_HASH,
 942   // the node is guaranteed never to compare equal to any other node.
 943   // If we accidentally generate a hash with value NO_HASH the node
 944   // won't go into the table and we'll lose a little optimization.
 945   enum { NO_HASH = 0 };
 946   virtual uint hash() const;
 947   virtual uint cmp( const Node &n ) const;
 948 
 949   // Operation appears to be iteratively computed (such as an induction variable)
 950   // It is possible for this operation to return false for a loop-varying
 951   // value, if it appears (by local graph inspection) to be computed by a simple conditional.
 952   bool is_iteratively_computed();
 953 
 954   // Determine if a node is Counted loop induction variable.
 955   // The method is defined in loopnode.cpp.
 956   const Node* is_loop_iv() const;
 957 
 958   // Return a node with opcode "opc" and same inputs as "this" if one can
 959   // be found; Otherwise return NULL;
 960   Node* find_similar(int opc);
 961 
 962   // Return the unique control out if only one. Null if none or more than one.
 963   Node* unique_ctrl_out();



 964 
 965 //----------------- Code Generation
 966 
 967   // Ideal register class for Matching.  Zero means unmatched instruction
 968   // (these are cloned instead of converted to machine nodes).
 969   virtual uint ideal_reg() const;
 970 
 971   static const uint NotAMachineReg;   // must be > max. machine register
 972 
 973   // Do we Match on this edge index or not?  Generally false for Control
 974   // and true for everything else.  Weird for calls & returns.
 975   virtual uint match_edge(uint idx) const;
 976 
 977   // Register class output is returned in
 978   virtual const RegMask &out_RegMask() const;
 979   // Register class input is expected in
 980   virtual const RegMask &in_RegMask(uint) const;
 981   // Should we clone rather than spill this instruction?
 982   bool rematerialize() const;
 983 




  54 class CatchNode;
  55 class CatchProjNode;
  56 class CheckCastPPNode;
  57 class CastIINode;
  58 class ClearArrayNode;
  59 class CmpNode;
  60 class CodeBuffer;
  61 class ConstraintCastNode;
  62 class ConNode;
  63 class CountedLoopNode;
  64 class CountedLoopEndNode;
  65 class DecodeNarrowPtrNode;
  66 class DecodeNNode;
  67 class DecodeNKlassNode;
  68 class EncodeNarrowPtrNode;
  69 class EncodePNode;
  70 class EncodePKlassNode;
  71 class FastLockNode;
  72 class FastUnlockNode;
  73 class IfNode;
  74 class IfProjNode;
  75 class IfFalseNode;
  76 class IfTrueNode;
  77 class InitializeNode;
  78 class JVMState;
  79 class JumpNode;
  80 class JumpProjNode;
  81 class LoadNode;
  82 class LoadStoreNode;
  83 class LockNode;
  84 class LoopNode;
  85 class MachBranchNode;
  86 class MachCallDynamicJavaNode;
  87 class MachCallJavaNode;
  88 class MachCallLeafNode;
  89 class MachCallNode;
  90 class MachCallRuntimeNode;
  91 class MachCallStaticJavaNode;
  92 class MachConstantBaseNode;
  93 class MachConstantNode;
  94 class MachGotoNode;
  95 class MachIfNode;
  96 class MachNode;
  97 class MachNullCheckNode;
  98 class MachProjNode;
  99 class MachReturnNode;
 100 class MachSafePointNode;
 101 class MachSpillCopyNode;
 102 class MachTempNode;
 103 class MachMergeNode;
 104 class MachMemBarNode;
 105 class Matcher;
 106 class MemBarNode;
 107 class MemBarStoreStoreNode;
 108 class MemNode;
 109 class MergeMemNode;
 110 class MulNode;
 111 class MultiNode;
 112 class MultiBranchNode;
 113 class NeverBranchNode;
 114 class Node;
 115 class Node_Array;
 116 class Node_List;
 117 class Node_Stack;
 118 class NullCheckNode;
 119 class OopMap;
 120 class ParmNode;
 121 class PCTableNode;
 122 class PhaseCCP;
 123 class PhaseGVN;
 124 class PhaseIterGVN;
 125 class PhaseRegAlloc;
 126 class PhaseTransform;
 127 class PhaseValues;
 128 class PhiNode;
 129 class Pipeline;
 130 class ProjNode;
 131 class RegMask;
 132 class RegionNode;
 133 class RootNode;
 134 class SafePointNode;
 135 class SafePointScalarObjectNode;
 136 class ShenandoahBarrierNode;
 137 class StartNode;
 138 class State;
 139 class StoreNode;
 140 class SubNode;
 141 class Type;
 142 class TypeNode;
 143 class UnlockNode;
 144 class VectorNode;
 145 class LoadVectorNode;
 146 class StoreVectorNode;
 147 class VectorSet;
 148 typedef void (*NFunc)(Node&,void*);
 149 extern "C" {
 150   typedef int (*C_sort_func_t)(const void *, const void *);
 151 }
 152 
 153 // The type of all node counts and indexes.
 154 // It must hold at least 16 bits, but must also be fast to load and store.
 155 // This type, if less than 32 bits, could limit the number of possible nodes.
 156 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)


 439   int replace_edge(Node* old, Node* neww);
 440   int replace_edges_in_range(Node* old, Node* neww, int start, int end);
 441   // NULL out all inputs to eliminate incoming Def-Use edges.
 442   // Return the number of edges between 'n' and 'this'
 443   int  disconnect_inputs(Node *n, Compile *c);
 444 
 445   // Quickly, return true if and only if I am Compile::current()->top().
 446   bool is_top() const {
 447     assert((this == (Node*) Compile::current()->top()) == (_out == NULL), "");
 448     return (_out == NULL);
 449   }
 450   // Reaffirm invariants for is_top.  (Only from Compile::set_cached_top_node.)
 451   void setup_is_top();
 452 
 453   // Strip away casting.  (It is depth-limited.)
 454   Node* uncast() const;
 455   // Return whether two Nodes are equivalent, after stripping casting.
 456   bool eqv_uncast(const Node* n) const {
 457     return (this->uncast() == n->uncast());
 458   }
 459   // Return true if the current node has an out that matches opcode.
 460   bool has_out_with(int opcode);
 461 
 462   // Find out of current node that matches opcode.
 463   Node* find_out_with(int opcode);
 464 
 465 private:
 466   static Node* uncast_helper(const Node* n);
 467 
 468   // Add an output edge to the end of the list
 469   void add_out( Node *n ) {
 470     if (is_top())  return;
 471     if( _outcnt == _outmax ) out_grow(_outcnt);
 472     _out[_outcnt++] = n;
 473   }
 474   // Delete an output edge
 475   void del_out( Node *n ) {
 476     if (is_top())  return;
 477     Node** outp = &_out[_outcnt];
 478     // Find and remove n
 479     do {
 480       assert(outp > _out, "Missing Def-Use edge");


 624         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 625 
 626     DEFINE_CLASS_ID(Mach,  Node, 1)
 627       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 628         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 629           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 630             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 631               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 632               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 633             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 634               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 635       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 636         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 637         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 638         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 639       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 640       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 641       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 642       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 643       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 644       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 645 
 646     DEFINE_CLASS_ID(Type,  Node, 2)
 647       DEFINE_CLASS_ID(Phi,   Type, 0)
 648       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 649         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 650       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
 651       DEFINE_CLASS_ID(CMove, Type, 3)
 652       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 653       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 654         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 655         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 656       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 657         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 658         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 659       DEFINE_CLASS_ID(ShenandoahBarrier, Type, 7)
 660 
 661     DEFINE_CLASS_ID(Proj,  Node, 3)
 662       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 663       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 664       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 665         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 666         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 667       DEFINE_CLASS_ID(Parm,      Proj, 4)
 668       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 669 
 670     DEFINE_CLASS_ID(Mem,   Node, 4)
 671       DEFINE_CLASS_ID(Load,  Mem, 0)
 672         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 673       DEFINE_CLASS_ID(Store, Mem, 1)
 674         DEFINE_CLASS_ID(StoreVector, Store, 0)
 675       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 676 
 677     DEFINE_CLASS_ID(Region, Node, 5)
 678       DEFINE_CLASS_ID(Loop, Region, 0)
 679         DEFINE_CLASS_ID(Root,        Loop, 0)
 680         DEFINE_CLASS_ID(CountedLoop, Loop, 1)
 681 
 682     DEFINE_CLASS_ID(Sub,   Node, 6)
 683       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 684         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 685         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 686 


 772   DEFINE_CLASS_QUERY(CallStaticJava)
 773   DEFINE_CLASS_QUERY(Catch)
 774   DEFINE_CLASS_QUERY(CatchProj)
 775   DEFINE_CLASS_QUERY(CheckCastPP)
 776   DEFINE_CLASS_QUERY(CastII)
 777   DEFINE_CLASS_QUERY(ConstraintCast)
 778   DEFINE_CLASS_QUERY(ClearArray)
 779   DEFINE_CLASS_QUERY(CMove)
 780   DEFINE_CLASS_QUERY(Cmp)
 781   DEFINE_CLASS_QUERY(CountedLoop)
 782   DEFINE_CLASS_QUERY(CountedLoopEnd)
 783   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 784   DEFINE_CLASS_QUERY(DecodeN)
 785   DEFINE_CLASS_QUERY(DecodeNKlass)
 786   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 787   DEFINE_CLASS_QUERY(EncodeP)
 788   DEFINE_CLASS_QUERY(EncodePKlass)
 789   DEFINE_CLASS_QUERY(FastLock)
 790   DEFINE_CLASS_QUERY(FastUnlock)
 791   DEFINE_CLASS_QUERY(If)
 792   DEFINE_CLASS_QUERY(IfProj)
 793   DEFINE_CLASS_QUERY(IfFalse)
 794   DEFINE_CLASS_QUERY(IfTrue)
 795   DEFINE_CLASS_QUERY(Initialize)
 796   DEFINE_CLASS_QUERY(Jump)
 797   DEFINE_CLASS_QUERY(JumpProj)
 798   DEFINE_CLASS_QUERY(Load)
 799   DEFINE_CLASS_QUERY(LoadStore)
 800   DEFINE_CLASS_QUERY(Lock)
 801   DEFINE_CLASS_QUERY(Loop)
 802   DEFINE_CLASS_QUERY(Mach)
 803   DEFINE_CLASS_QUERY(MachBranch)
 804   DEFINE_CLASS_QUERY(MachCall)
 805   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 806   DEFINE_CLASS_QUERY(MachCallJava)
 807   DEFINE_CLASS_QUERY(MachCallLeaf)
 808   DEFINE_CLASS_QUERY(MachCallRuntime)
 809   DEFINE_CLASS_QUERY(MachCallStaticJava)
 810   DEFINE_CLASS_QUERY(MachConstantBase)
 811   DEFINE_CLASS_QUERY(MachConstant)
 812   DEFINE_CLASS_QUERY(MachGoto)
 813   DEFINE_CLASS_QUERY(MachIf)
 814   DEFINE_CLASS_QUERY(MachNullCheck)
 815   DEFINE_CLASS_QUERY(MachProj)
 816   DEFINE_CLASS_QUERY(MachReturn)
 817   DEFINE_CLASS_QUERY(MachSafePoint)
 818   DEFINE_CLASS_QUERY(MachSpillCopy)
 819   DEFINE_CLASS_QUERY(MachTemp)
 820   DEFINE_CLASS_QUERY(MachMemBar)
 821   DEFINE_CLASS_QUERY(MachMerge)
 822   DEFINE_CLASS_QUERY(Mem)
 823   DEFINE_CLASS_QUERY(MemBar)
 824   DEFINE_CLASS_QUERY(MemBarStoreStore)
 825   DEFINE_CLASS_QUERY(MergeMem)
 826   DEFINE_CLASS_QUERY(Mul)
 827   DEFINE_CLASS_QUERY(Multi)
 828   DEFINE_CLASS_QUERY(MultiBranch)
 829   DEFINE_CLASS_QUERY(Parm)
 830   DEFINE_CLASS_QUERY(PCTable)
 831   DEFINE_CLASS_QUERY(Phi)
 832   DEFINE_CLASS_QUERY(Proj)
 833   DEFINE_CLASS_QUERY(Region)
 834   DEFINE_CLASS_QUERY(Root)
 835   DEFINE_CLASS_QUERY(SafePoint)
 836   DEFINE_CLASS_QUERY(SafePointScalarObject)
 837   DEFINE_CLASS_QUERY(ShenandoahBarrier)
 838   DEFINE_CLASS_QUERY(Start)
 839   DEFINE_CLASS_QUERY(Store)
 840   DEFINE_CLASS_QUERY(Sub)
 841   DEFINE_CLASS_QUERY(Type)
 842   DEFINE_CLASS_QUERY(Vector)
 843   DEFINE_CLASS_QUERY(LoadVector)
 844   DEFINE_CLASS_QUERY(StoreVector)
 845   DEFINE_CLASS_QUERY(Unlock)
 846 
 847   #undef DEFINE_CLASS_QUERY
 848 
 849   // duplicate of is_MachSpillCopy()
 850   bool is_SpillCopy () const {
 851     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 852   }
 853 
 854   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 855   // The data node which is safe to leave in dead loop during IGVN optimization.
 856   bool is_dead_loop_safe() const {
 857     return is_Phi() || (is_Proj() && in(0) == NULL) ||


 916   // Return the set of values this Node can take on at runtime.
 917   virtual const Type *Value( PhaseTransform *phase ) const;
 918 
 919   // Return a node which is more "ideal" than the current node.
 920   // The invariants on this call are subtle.  If in doubt, read the
 921   // treatise in node.cpp above the default implemention AND TEST WITH
 922   // +VerifyIterativeGVN!
 923   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 924 
 925   // Some nodes have specific Ideal subgraph transformations only if they are
 926   // unique users of specific nodes. Such nodes should be put on IGVN worklist
 927   // for the transformations to happen.
 928   bool has_special_unique_user() const;
 929 
 930   // Skip Proj and CatchProj nodes chains. Check for Null and Top.
 931   Node* find_exact_control(Node* ctrl);
 932 
 933   // Check if 'this' node dominates or equal to 'sub'.
 934   bool dominates(Node* sub, Node_List &nlist);
 935 
 936   virtual bool is_g1_wb_pre_call() const { return false; }
 937   virtual bool is_shenandoah_state_load() const { return false; }
 938   virtual bool is_shenandoah_marking_if(PhaseTransform *phase) const { return false; }
 939 
 940 protected:
 941   bool remove_dead_region(PhaseGVN *phase, bool can_reshape);
 942 public:
 943 



 944   // See if there is valid pipeline info
 945   static  const Pipeline *pipeline_class();
 946   virtual const Pipeline *pipeline() const;
 947 
 948   // Compute the latency from the def to this instruction of the ith input node
 949   uint latency(uint i);
 950 
 951   // Hash & compare functions, for pessimistic value numbering
 952 
 953   // If the hash function returns the special sentinel value NO_HASH,
 954   // the node is guaranteed never to compare equal to any other node.
 955   // If we accidentally generate a hash with value NO_HASH the node
 956   // won't go into the table and we'll lose a little optimization.
 957   enum { NO_HASH = 0 };
 958   virtual uint hash() const;
 959   virtual uint cmp( const Node &n ) const;
 960 
 961   // Operation appears to be iteratively computed (such as an induction variable)
 962   // It is possible for this operation to return false for a loop-varying
 963   // value, if it appears (by local graph inspection) to be computed by a simple conditional.
 964   bool is_iteratively_computed();
 965 
 966   // Determine if a node is Counted loop induction variable.
 967   // The method is defined in loopnode.cpp.
 968   const Node* is_loop_iv() const;
 969 
 970   // Return a node with opcode "opc" and same inputs as "this" if one can
 971   // be found; Otherwise return NULL;
 972   Node* find_similar(int opc);
 973 
 974   // Return the unique control out if only one. Null if none or more than one.
 975   Node* unique_ctrl_out();
 976 
 977   // Set control or add control as precedence edge
 978   void ensure_control_or_add_prec(Node* c);
 979 
 980 //----------------- Code Generation
 981 
 982   // Ideal register class for Matching.  Zero means unmatched instruction
 983   // (these are cloned instead of converted to machine nodes).
 984   virtual uint ideal_reg() const;
 985 
 986   static const uint NotAMachineReg;   // must be > max. machine register
 987 
 988   // Do we Match on this edge index or not?  Generally false for Control
 989   // and true for everything else.  Weird for calls & returns.
 990   virtual uint match_edge(uint idx) const;
 991 
 992   // Register class output is returned in
 993   virtual const RegMask &out_RegMask() const;
 994   // Register class input is expected in
 995   virtual const RegMask &in_RegMask(uint) const;
 996   // Should we clone rather than spill this instruction?
 997   bool rematerialize() const;
 998 


< prev index next >