< 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.)


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




 446 
 447 private:
 448   static Node* uncast_helper(const Node* n);
 449 
 450   // Add an output edge to the end of the list
 451   void add_out( Node *n ) {
 452     if (is_top())  return;
 453     if( _outcnt == _outmax ) out_grow(_outcnt);
 454     _out[_outcnt++] = n;
 455   }
 456   // Delete an output edge
 457   void del_out( Node *n ) {
 458     if (is_top())  return;
 459     Node** outp = &_out[_outcnt];
 460     // Find and remove n
 461     do {
 462       assert(outp > _out, "Missing Def-Use edge");
 463     } while (*--outp != n);
 464     *outp = _out[--_outcnt];
 465     // Smash the old edge so it can't be used accidentally.


 583         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 584 
 585     DEFINE_CLASS_ID(Mach,  Node, 1)
 586       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 587         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 588           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 589             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 590               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 591               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 592             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 593               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 594       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 595         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 596         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 597         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 598       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 599       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 600       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 601       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 602       DEFINE_CLASS_ID(MachMerge,        Mach, 6)

 603 
 604     DEFINE_CLASS_ID(Type,  Node, 2)
 605       DEFINE_CLASS_ID(Phi,   Type, 0)
 606       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 607         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 608       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
 609       DEFINE_CLASS_ID(CMove, Type, 3)
 610       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 611       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 612         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 613         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 614       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 615         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 616         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)

 617 
 618     DEFINE_CLASS_ID(Proj,  Node, 3)
 619       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 620       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 621       DEFINE_CLASS_ID(IfTrue,    Proj, 2)
 622       DEFINE_CLASS_ID(IfFalse,   Proj, 3)

 623       DEFINE_CLASS_ID(Parm,      Proj, 4)
 624       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 625 
 626     DEFINE_CLASS_ID(Mem,   Node, 4)
 627       DEFINE_CLASS_ID(Load,  Mem, 0)
 628         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 629       DEFINE_CLASS_ID(Store, Mem, 1)
 630         DEFINE_CLASS_ID(StoreVector, Store, 0)
 631       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 632 
 633     DEFINE_CLASS_ID(Region, Node, 5)
 634       DEFINE_CLASS_ID(Loop, Region, 0)
 635         DEFINE_CLASS_ID(Root,        Loop, 0)
 636         DEFINE_CLASS_ID(CountedLoop, Loop, 1)
 637 
 638     DEFINE_CLASS_ID(Sub,   Node, 6)
 639       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 640         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 641         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 642 


 728   DEFINE_CLASS_QUERY(CallStaticJava)
 729   DEFINE_CLASS_QUERY(Catch)
 730   DEFINE_CLASS_QUERY(CatchProj)
 731   DEFINE_CLASS_QUERY(CheckCastPP)
 732   DEFINE_CLASS_QUERY(CastII)
 733   DEFINE_CLASS_QUERY(ConstraintCast)
 734   DEFINE_CLASS_QUERY(ClearArray)
 735   DEFINE_CLASS_QUERY(CMove)
 736   DEFINE_CLASS_QUERY(Cmp)
 737   DEFINE_CLASS_QUERY(CountedLoop)
 738   DEFINE_CLASS_QUERY(CountedLoopEnd)
 739   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 740   DEFINE_CLASS_QUERY(DecodeN)
 741   DEFINE_CLASS_QUERY(DecodeNKlass)
 742   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 743   DEFINE_CLASS_QUERY(EncodeP)
 744   DEFINE_CLASS_QUERY(EncodePKlass)
 745   DEFINE_CLASS_QUERY(FastLock)
 746   DEFINE_CLASS_QUERY(FastUnlock)
 747   DEFINE_CLASS_QUERY(If)

 748   DEFINE_CLASS_QUERY(IfFalse)
 749   DEFINE_CLASS_QUERY(IfTrue)
 750   DEFINE_CLASS_QUERY(Initialize)
 751   DEFINE_CLASS_QUERY(Jump)
 752   DEFINE_CLASS_QUERY(JumpProj)
 753   DEFINE_CLASS_QUERY(Load)
 754   DEFINE_CLASS_QUERY(LoadStore)
 755   DEFINE_CLASS_QUERY(Lock)
 756   DEFINE_CLASS_QUERY(Loop)
 757   DEFINE_CLASS_QUERY(Mach)
 758   DEFINE_CLASS_QUERY(MachBranch)
 759   DEFINE_CLASS_QUERY(MachCall)
 760   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 761   DEFINE_CLASS_QUERY(MachCallJava)
 762   DEFINE_CLASS_QUERY(MachCallLeaf)
 763   DEFINE_CLASS_QUERY(MachCallRuntime)
 764   DEFINE_CLASS_QUERY(MachCallStaticJava)
 765   DEFINE_CLASS_QUERY(MachConstantBase)
 766   DEFINE_CLASS_QUERY(MachConstant)
 767   DEFINE_CLASS_QUERY(MachGoto)
 768   DEFINE_CLASS_QUERY(MachIf)
 769   DEFINE_CLASS_QUERY(MachNullCheck)
 770   DEFINE_CLASS_QUERY(MachProj)
 771   DEFINE_CLASS_QUERY(MachReturn)
 772   DEFINE_CLASS_QUERY(MachSafePoint)
 773   DEFINE_CLASS_QUERY(MachSpillCopy)
 774   DEFINE_CLASS_QUERY(MachTemp)

 775   DEFINE_CLASS_QUERY(MachMerge)
 776   DEFINE_CLASS_QUERY(Mem)
 777   DEFINE_CLASS_QUERY(MemBar)
 778   DEFINE_CLASS_QUERY(MemBarStoreStore)
 779   DEFINE_CLASS_QUERY(MergeMem)
 780   DEFINE_CLASS_QUERY(Mul)
 781   DEFINE_CLASS_QUERY(Multi)
 782   DEFINE_CLASS_QUERY(MultiBranch)
 783   DEFINE_CLASS_QUERY(Parm)
 784   DEFINE_CLASS_QUERY(PCTable)
 785   DEFINE_CLASS_QUERY(Phi)
 786   DEFINE_CLASS_QUERY(Proj)
 787   DEFINE_CLASS_QUERY(Region)
 788   DEFINE_CLASS_QUERY(Root)
 789   DEFINE_CLASS_QUERY(SafePoint)
 790   DEFINE_CLASS_QUERY(SafePointScalarObject)

 791   DEFINE_CLASS_QUERY(Start)
 792   DEFINE_CLASS_QUERY(Store)
 793   DEFINE_CLASS_QUERY(Sub)
 794   DEFINE_CLASS_QUERY(Type)
 795   DEFINE_CLASS_QUERY(Vector)
 796   DEFINE_CLASS_QUERY(LoadVector)
 797   DEFINE_CLASS_QUERY(StoreVector)
 798   DEFINE_CLASS_QUERY(Unlock)
 799 
 800   #undef DEFINE_CLASS_QUERY
 801 
 802   // duplicate of is_MachSpillCopy()
 803   bool is_SpillCopy () const {
 804     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 805   }
 806 
 807   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 808   // The data node which is safe to leave in dead loop during IGVN optimization.
 809   bool is_dead_loop_safe() const {
 810     return is_Phi() || (is_Proj() && in(0) == NULL) ||


 869   // Return the set of values this Node can take on at runtime.
 870   virtual const Type *Value( PhaseTransform *phase ) const;
 871 
 872   // Return a node which is more "ideal" than the current node.
 873   // The invariants on this call are subtle.  If in doubt, read the
 874   // treatise in node.cpp above the default implemention AND TEST WITH
 875   // +VerifyIterativeGVN!
 876   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 877 
 878   // Some nodes have specific Ideal subgraph transformations only if they are
 879   // unique users of specific nodes. Such nodes should be put on IGVN worklist
 880   // for the transformations to happen.
 881   bool has_special_unique_user() const;
 882 
 883   // Skip Proj and CatchProj nodes chains. Check for Null and Top.
 884   Node* find_exact_control(Node* ctrl);
 885 
 886   // Check if 'this' node dominates or equal to 'sub'.
 887   bool dominates(Node* sub, Node_List &nlist);
 888 




 889 protected:
 890   bool remove_dead_region(PhaseGVN *phase, bool can_reshape);
 891 public:
 892 
 893   // Idealize graph, using DU info.  Done after constant propagation
 894   virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
 895 
 896   // See if there is valid pipeline info
 897   static  const Pipeline *pipeline_class();
 898   virtual const Pipeline *pipeline() const;
 899 
 900   // Compute the latency from the def to this instruction of the ith input node
 901   uint latency(uint i);
 902 
 903   // Hash & compare functions, for pessimistic value numbering
 904 
 905   // If the hash function returns the special sentinel value NO_HASH,
 906   // the node is guaranteed never to compare equal to any other node.
 907   // If we accidentally generate a hash with value NO_HASH the node
 908   // won't go into the table and we'll lose a little optimization.
 909   enum { NO_HASH = 0 };
 910   virtual uint hash() const;
 911   virtual uint cmp( const Node &n ) const;
 912 
 913   // Operation appears to be iteratively computed (such as an induction variable)
 914   // It is possible for this operation to return false for a loop-varying
 915   // value, if it appears (by local graph inspection) to be computed by a simple conditional.
 916   bool is_iteratively_computed();
 917 
 918   // Determine if a node is Counted loop induction variable.
 919   // The method is defined in loopnode.cpp.
 920   const Node* is_loop_iv() const;
 921 
 922   // Return a node with opcode "opc" and same inputs as "this" if one can
 923   // be found; Otherwise return NULL;
 924   Node* find_similar(int opc);
 925 
 926   // Return the unique control out if only one. Null if none or more than one.
 927   Node* unique_ctrl_out();



 928 
 929 //----------------- Code Generation
 930 
 931   // Ideal register class for Matching.  Zero means unmatched instruction
 932   // (these are cloned instead of converted to machine nodes).
 933   virtual uint ideal_reg() const;
 934 
 935   static const uint NotAMachineReg;   // must be > max. machine register
 936 
 937   // Do we Match on this edge index or not?  Generally false for Control
 938   // and true for everything else.  Weird for calls & returns.
 939   virtual uint match_edge(uint idx) const;
 940 
 941   // Register class output is returned in
 942   virtual const RegMask &out_RegMask() const;
 943   // Register class input is expected in
 944   virtual const RegMask &in_RegMask(uint) const;
 945   // Should we clone rather than spill this instruction?
 946   bool rematerialize() const;
 947 




  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.)


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


 590         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 591 
 592     DEFINE_CLASS_ID(Mach,  Node, 1)
 593       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 594         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 595           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 596             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 597               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 598               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 599             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 600               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 601       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 602         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 603         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 604         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 605       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 606       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 607       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 608       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 609       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 610       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 611 
 612     DEFINE_CLASS_ID(Type,  Node, 2)
 613       DEFINE_CLASS_ID(Phi,   Type, 0)
 614       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 615         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 616       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
 617       DEFINE_CLASS_ID(CMove, Type, 3)
 618       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 619       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 620         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 621         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 622       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 623         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 624         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 625       DEFINE_CLASS_ID(ShenandoahBarrier, Type, 7)
 626 
 627     DEFINE_CLASS_ID(Proj,  Node, 3)
 628       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 629       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 630       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 631         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 632         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 633       DEFINE_CLASS_ID(Parm,      Proj, 4)
 634       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 635 
 636     DEFINE_CLASS_ID(Mem,   Node, 4)
 637       DEFINE_CLASS_ID(Load,  Mem, 0)
 638         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 639       DEFINE_CLASS_ID(Store, Mem, 1)
 640         DEFINE_CLASS_ID(StoreVector, Store, 0)
 641       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 642 
 643     DEFINE_CLASS_ID(Region, Node, 5)
 644       DEFINE_CLASS_ID(Loop, Region, 0)
 645         DEFINE_CLASS_ID(Root,        Loop, 0)
 646         DEFINE_CLASS_ID(CountedLoop, Loop, 1)
 647 
 648     DEFINE_CLASS_ID(Sub,   Node, 6)
 649       DEFINE_CLASS_ID(Cmp,   Sub, 0)
 650         DEFINE_CLASS_ID(FastLock,   Cmp, 0)
 651         DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
 652 


 738   DEFINE_CLASS_QUERY(CallStaticJava)
 739   DEFINE_CLASS_QUERY(Catch)
 740   DEFINE_CLASS_QUERY(CatchProj)
 741   DEFINE_CLASS_QUERY(CheckCastPP)
 742   DEFINE_CLASS_QUERY(CastII)
 743   DEFINE_CLASS_QUERY(ConstraintCast)
 744   DEFINE_CLASS_QUERY(ClearArray)
 745   DEFINE_CLASS_QUERY(CMove)
 746   DEFINE_CLASS_QUERY(Cmp)
 747   DEFINE_CLASS_QUERY(CountedLoop)
 748   DEFINE_CLASS_QUERY(CountedLoopEnd)
 749   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 750   DEFINE_CLASS_QUERY(DecodeN)
 751   DEFINE_CLASS_QUERY(DecodeNKlass)
 752   DEFINE_CLASS_QUERY(EncodeNarrowPtr)
 753   DEFINE_CLASS_QUERY(EncodeP)
 754   DEFINE_CLASS_QUERY(EncodePKlass)
 755   DEFINE_CLASS_QUERY(FastLock)
 756   DEFINE_CLASS_QUERY(FastUnlock)
 757   DEFINE_CLASS_QUERY(If)
 758   DEFINE_CLASS_QUERY(IfProj)
 759   DEFINE_CLASS_QUERY(IfFalse)
 760   DEFINE_CLASS_QUERY(IfTrue)
 761   DEFINE_CLASS_QUERY(Initialize)
 762   DEFINE_CLASS_QUERY(Jump)
 763   DEFINE_CLASS_QUERY(JumpProj)
 764   DEFINE_CLASS_QUERY(Load)
 765   DEFINE_CLASS_QUERY(LoadStore)
 766   DEFINE_CLASS_QUERY(Lock)
 767   DEFINE_CLASS_QUERY(Loop)
 768   DEFINE_CLASS_QUERY(Mach)
 769   DEFINE_CLASS_QUERY(MachBranch)
 770   DEFINE_CLASS_QUERY(MachCall)
 771   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 772   DEFINE_CLASS_QUERY(MachCallJava)
 773   DEFINE_CLASS_QUERY(MachCallLeaf)
 774   DEFINE_CLASS_QUERY(MachCallRuntime)
 775   DEFINE_CLASS_QUERY(MachCallStaticJava)
 776   DEFINE_CLASS_QUERY(MachConstantBase)
 777   DEFINE_CLASS_QUERY(MachConstant)
 778   DEFINE_CLASS_QUERY(MachGoto)
 779   DEFINE_CLASS_QUERY(MachIf)
 780   DEFINE_CLASS_QUERY(MachNullCheck)
 781   DEFINE_CLASS_QUERY(MachProj)
 782   DEFINE_CLASS_QUERY(MachReturn)
 783   DEFINE_CLASS_QUERY(MachSafePoint)
 784   DEFINE_CLASS_QUERY(MachSpillCopy)
 785   DEFINE_CLASS_QUERY(MachTemp)
 786   DEFINE_CLASS_QUERY(MachMemBar)
 787   DEFINE_CLASS_QUERY(MachMerge)
 788   DEFINE_CLASS_QUERY(Mem)
 789   DEFINE_CLASS_QUERY(MemBar)
 790   DEFINE_CLASS_QUERY(MemBarStoreStore)
 791   DEFINE_CLASS_QUERY(MergeMem)
 792   DEFINE_CLASS_QUERY(Mul)
 793   DEFINE_CLASS_QUERY(Multi)
 794   DEFINE_CLASS_QUERY(MultiBranch)
 795   DEFINE_CLASS_QUERY(Parm)
 796   DEFINE_CLASS_QUERY(PCTable)
 797   DEFINE_CLASS_QUERY(Phi)
 798   DEFINE_CLASS_QUERY(Proj)
 799   DEFINE_CLASS_QUERY(Region)
 800   DEFINE_CLASS_QUERY(Root)
 801   DEFINE_CLASS_QUERY(SafePoint)
 802   DEFINE_CLASS_QUERY(SafePointScalarObject)
 803   DEFINE_CLASS_QUERY(ShenandoahBarrier)
 804   DEFINE_CLASS_QUERY(Start)
 805   DEFINE_CLASS_QUERY(Store)
 806   DEFINE_CLASS_QUERY(Sub)
 807   DEFINE_CLASS_QUERY(Type)
 808   DEFINE_CLASS_QUERY(Vector)
 809   DEFINE_CLASS_QUERY(LoadVector)
 810   DEFINE_CLASS_QUERY(StoreVector)
 811   DEFINE_CLASS_QUERY(Unlock)
 812 
 813   #undef DEFINE_CLASS_QUERY
 814 
 815   // duplicate of is_MachSpillCopy()
 816   bool is_SpillCopy () const {
 817     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 818   }
 819 
 820   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 821   // The data node which is safe to leave in dead loop during IGVN optimization.
 822   bool is_dead_loop_safe() const {
 823     return is_Phi() || (is_Proj() && in(0) == NULL) ||


 882   // Return the set of values this Node can take on at runtime.
 883   virtual const Type *Value( PhaseTransform *phase ) const;
 884 
 885   // Return a node which is more "ideal" than the current node.
 886   // The invariants on this call are subtle.  If in doubt, read the
 887   // treatise in node.cpp above the default implemention AND TEST WITH
 888   // +VerifyIterativeGVN!
 889   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 890 
 891   // Some nodes have specific Ideal subgraph transformations only if they are
 892   // unique users of specific nodes. Such nodes should be put on IGVN worklist
 893   // for the transformations to happen.
 894   bool has_special_unique_user() const;
 895 
 896   // Skip Proj and CatchProj nodes chains. Check for Null and Top.
 897   Node* find_exact_control(Node* ctrl);
 898 
 899   // Check if 'this' node dominates or equal to 'sub'.
 900   bool dominates(Node* sub, Node_List &nlist);
 901 
 902   virtual bool is_g1_wb_pre_call() const { return false; }
 903   virtual bool is_shenandoah_state_load() const { return false; }
 904   virtual bool is_shenandoah_marking_if(PhaseTransform *phase) const { return false; }
 905 
 906 protected:
 907   bool remove_dead_region(PhaseGVN *phase, bool can_reshape);
 908 public:
 909 



 910   // See if there is valid pipeline info
 911   static  const Pipeline *pipeline_class();
 912   virtual const Pipeline *pipeline() const;
 913 
 914   // Compute the latency from the def to this instruction of the ith input node
 915   uint latency(uint i);
 916 
 917   // Hash & compare functions, for pessimistic value numbering
 918 
 919   // If the hash function returns the special sentinel value NO_HASH,
 920   // the node is guaranteed never to compare equal to any other node.
 921   // If we accidentally generate a hash with value NO_HASH the node
 922   // won't go into the table and we'll lose a little optimization.
 923   enum { NO_HASH = 0 };
 924   virtual uint hash() const;
 925   virtual uint cmp( const Node &n ) const;
 926 
 927   // Operation appears to be iteratively computed (such as an induction variable)
 928   // It is possible for this operation to return false for a loop-varying
 929   // value, if it appears (by local graph inspection) to be computed by a simple conditional.
 930   bool is_iteratively_computed();
 931 
 932   // Determine if a node is Counted loop induction variable.
 933   // The method is defined in loopnode.cpp.
 934   const Node* is_loop_iv() const;
 935 
 936   // Return a node with opcode "opc" and same inputs as "this" if one can
 937   // be found; Otherwise return NULL;
 938   Node* find_similar(int opc);
 939 
 940   // Return the unique control out if only one. Null if none or more than one.
 941   Node* unique_ctrl_out();
 942 
 943   // Set control or add control as precedence edge
 944   void ensure_control_or_add_prec(Node* c);
 945 
 946 //----------------- Code Generation
 947 
 948   // Ideal register class for Matching.  Zero means unmatched instruction
 949   // (these are cloned instead of converted to machine nodes).
 950   virtual uint ideal_reg() const;
 951 
 952   static const uint NotAMachineReg;   // must be > max. machine register
 953 
 954   // Do we Match on this edge index or not?  Generally false for Control
 955   // and true for everything else.  Weird for calls & returns.
 956   virtual uint match_edge(uint idx) const;
 957 
 958   // Register class output is returned in
 959   virtual const RegMask &out_RegMask() const;
 960   // Register class input is expected in
 961   virtual const RegMask &in_RegMask(uint) const;
 962   // Should we clone rather than spill this instruction?
 963   bool rematerialize() const;
 964 


< prev index next >