< prev index next >

src/hotspot/share/opto/node.hpp

Print this page




  85 class LoadBarrierSlowRegNode;
  86 class LoadStoreNode;
  87 class LoadStoreConditionalNode;
  88 class LockNode;
  89 class LoopNode;
  90 class MachBranchNode;
  91 class MachCallDynamicJavaNode;
  92 class MachCallJavaNode;
  93 class MachCallLeafNode;
  94 class MachCallNode;
  95 class MachCallRuntimeNode;
  96 class MachCallStaticJavaNode;
  97 class MachConstantBaseNode;
  98 class MachConstantNode;
  99 class MachGotoNode;
 100 class MachIfNode;
 101 class MachJumpNode;
 102 class MachNode;
 103 class MachNullCheckNode;
 104 class MachProjNode;

 105 class MachReturnNode;
 106 class MachSafePointNode;
 107 class MachSpillCopyNode;
 108 class MachTempNode;
 109 class MachMergeNode;
 110 class MachMemBarNode;
 111 class Matcher;
 112 class MemBarNode;
 113 class MemBarStoreStoreNode;
 114 class MemNode;
 115 class MergeMemNode;
 116 class MulNode;
 117 class MultiNode;
 118 class MultiBranchNode;
 119 class NeverBranchNode;
 120 class OuterStripMinedLoopNode;
 121 class OuterStripMinedLoopEndNode;
 122 class Node;
 123 class Node_Array;
 124 class Node_List;


 132 class PhaseIterGVN;
 133 class PhaseRegAlloc;
 134 class PhaseTransform;
 135 class PhaseValues;
 136 class PhiNode;
 137 class Pipeline;
 138 class ProjNode;
 139 class RangeCheckNode;
 140 class RegMask;
 141 class RegionNode;
 142 class RootNode;
 143 class SafePointNode;
 144 class SafePointScalarObjectNode;
 145 class StartNode;
 146 class State;
 147 class StoreNode;
 148 class SubNode;
 149 class Type;
 150 class TypeNode;
 151 class UnlockNode;



 152 class VectorNode;
 153 class LoadVectorNode;
 154 class StoreVectorNode;
 155 class VectorSet;
 156 typedef void (*NFunc)(Node&,void*);
 157 extern "C" {
 158   typedef int (*C_sort_func_t)(const void *, const void *);
 159 }
 160 
 161 // The type of all node counts and indexes.
 162 // It must hold at least 16 bits, but must also be fast to load and store.
 163 // This type, if less than 32 bits, could limit the number of possible nodes.
 164 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 165 typedef unsigned int node_idx_t;
 166 
 167 
 168 #ifndef OPTO_DU_ITERATOR_ASSERT
 169 #ifdef ASSERT
 170 #define OPTO_DU_ITERATOR_ASSERT 1
 171 #else


 644     DEFINE_CLASS_ID(Mach,  Node, 1)
 645       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 646         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 647           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 648             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 649               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 650               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 651             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 652               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 653       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 654         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 655         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 656         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 657       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 658       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 659       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 660       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 661         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 662       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 663       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)

 664 
 665     DEFINE_CLASS_ID(Type,  Node, 2)
 666       DEFINE_CLASS_ID(Phi,   Type, 0)
 667       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 668         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 669         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 670       DEFINE_CLASS_ID(CMove, Type, 3)
 671       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 672       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 673         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 674         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 675       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 676         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 677         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)



 678 
 679     DEFINE_CLASS_ID(Proj,  Node, 3)
 680       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 681       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 682       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 683         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 684         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 685       DEFINE_CLASS_ID(Parm,      Proj, 4)
 686       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 687 
 688     DEFINE_CLASS_ID(Mem,   Node, 4)
 689       DEFINE_CLASS_ID(Load,  Mem, 0)
 690         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 691         DEFINE_CLASS_ID(LoadBarrierSlowReg, Load, 1)
 692       DEFINE_CLASS_ID(Store, Mem, 1)
 693         DEFINE_CLASS_ID(StoreVector, Store, 0)
 694       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 695         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 696           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 697         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)


 832   DEFINE_CLASS_QUERY(LoadStoreConditional)
 833   DEFINE_CLASS_QUERY(LoadBarrier)
 834   DEFINE_CLASS_QUERY(LoadBarrierSlowReg)
 835   DEFINE_CLASS_QUERY(Lock)
 836   DEFINE_CLASS_QUERY(Loop)
 837   DEFINE_CLASS_QUERY(Mach)
 838   DEFINE_CLASS_QUERY(MachBranch)
 839   DEFINE_CLASS_QUERY(MachCall)
 840   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 841   DEFINE_CLASS_QUERY(MachCallJava)
 842   DEFINE_CLASS_QUERY(MachCallLeaf)
 843   DEFINE_CLASS_QUERY(MachCallRuntime)
 844   DEFINE_CLASS_QUERY(MachCallStaticJava)
 845   DEFINE_CLASS_QUERY(MachConstantBase)
 846   DEFINE_CLASS_QUERY(MachConstant)
 847   DEFINE_CLASS_QUERY(MachGoto)
 848   DEFINE_CLASS_QUERY(MachIf)
 849   DEFINE_CLASS_QUERY(MachJump)
 850   DEFINE_CLASS_QUERY(MachNullCheck)
 851   DEFINE_CLASS_QUERY(MachProj)

 852   DEFINE_CLASS_QUERY(MachReturn)
 853   DEFINE_CLASS_QUERY(MachSafePoint)
 854   DEFINE_CLASS_QUERY(MachSpillCopy)
 855   DEFINE_CLASS_QUERY(MachTemp)
 856   DEFINE_CLASS_QUERY(MachMemBar)
 857   DEFINE_CLASS_QUERY(MachMerge)
 858   DEFINE_CLASS_QUERY(Mem)
 859   DEFINE_CLASS_QUERY(MemBar)
 860   DEFINE_CLASS_QUERY(MemBarStoreStore)
 861   DEFINE_CLASS_QUERY(MergeMem)
 862   DEFINE_CLASS_QUERY(Mul)
 863   DEFINE_CLASS_QUERY(Multi)
 864   DEFINE_CLASS_QUERY(MultiBranch)
 865   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
 866   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
 867   DEFINE_CLASS_QUERY(Parm)
 868   DEFINE_CLASS_QUERY(PCTable)
 869   DEFINE_CLASS_QUERY(Phi)
 870   DEFINE_CLASS_QUERY(Proj)
 871   DEFINE_CLASS_QUERY(Region)
 872   DEFINE_CLASS_QUERY(Root)
 873   DEFINE_CLASS_QUERY(SafePoint)
 874   DEFINE_CLASS_QUERY(SafePointScalarObject)
 875   DEFINE_CLASS_QUERY(Start)
 876   DEFINE_CLASS_QUERY(Store)
 877   DEFINE_CLASS_QUERY(Sub)
 878   DEFINE_CLASS_QUERY(Type)



 879   DEFINE_CLASS_QUERY(Vector)
 880   DEFINE_CLASS_QUERY(LoadVector)
 881   DEFINE_CLASS_QUERY(StoreVector)
 882   DEFINE_CLASS_QUERY(Unlock)
 883 
 884   #undef DEFINE_CLASS_QUERY
 885 
 886   // duplicate of is_MachSpillCopy()
 887   bool is_SpillCopy () const {
 888     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 889   }
 890 
 891   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 892   // The data node which is safe to leave in dead loop during IGVN optimization.
 893   bool is_dead_loop_safe() const {
 894     return is_Phi() || (is_Proj() && in(0) == NULL) ||
 895            ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
 896             (!is_Proj() || !in(0)->is_Allocate()));
 897   }
 898 




  85 class LoadBarrierSlowRegNode;
  86 class LoadStoreNode;
  87 class LoadStoreConditionalNode;
  88 class LockNode;
  89 class LoopNode;
  90 class MachBranchNode;
  91 class MachCallDynamicJavaNode;
  92 class MachCallJavaNode;
  93 class MachCallLeafNode;
  94 class MachCallNode;
  95 class MachCallRuntimeNode;
  96 class MachCallStaticJavaNode;
  97 class MachConstantBaseNode;
  98 class MachConstantNode;
  99 class MachGotoNode;
 100 class MachIfNode;
 101 class MachJumpNode;
 102 class MachNode;
 103 class MachNullCheckNode;
 104 class MachProjNode;
 105 class MachPrologNode;
 106 class MachReturnNode;
 107 class MachSafePointNode;
 108 class MachSpillCopyNode;
 109 class MachTempNode;
 110 class MachMergeNode;
 111 class MachMemBarNode;
 112 class Matcher;
 113 class MemBarNode;
 114 class MemBarStoreStoreNode;
 115 class MemNode;
 116 class MergeMemNode;
 117 class MulNode;
 118 class MultiNode;
 119 class MultiBranchNode;
 120 class NeverBranchNode;
 121 class OuterStripMinedLoopNode;
 122 class OuterStripMinedLoopEndNode;
 123 class Node;
 124 class Node_Array;
 125 class Node_List;


 133 class PhaseIterGVN;
 134 class PhaseRegAlloc;
 135 class PhaseTransform;
 136 class PhaseValues;
 137 class PhiNode;
 138 class Pipeline;
 139 class ProjNode;
 140 class RangeCheckNode;
 141 class RegMask;
 142 class RegionNode;
 143 class RootNode;
 144 class SafePointNode;
 145 class SafePointScalarObjectNode;
 146 class StartNode;
 147 class State;
 148 class StoreNode;
 149 class SubNode;
 150 class Type;
 151 class TypeNode;
 152 class UnlockNode;
 153 class ValueTypeBaseNode;
 154 class ValueTypeNode;
 155 class ValueTypePtrNode;
 156 class VectorNode;
 157 class LoadVectorNode;
 158 class StoreVectorNode;
 159 class VectorSet;
 160 typedef void (*NFunc)(Node&,void*);
 161 extern "C" {
 162   typedef int (*C_sort_func_t)(const void *, const void *);
 163 }
 164 
 165 // The type of all node counts and indexes.
 166 // It must hold at least 16 bits, but must also be fast to load and store.
 167 // This type, if less than 32 bits, could limit the number of possible nodes.
 168 // (To make this type platform-specific, move to globalDefinitions_xxx.hpp.)
 169 typedef unsigned int node_idx_t;
 170 
 171 
 172 #ifndef OPTO_DU_ITERATOR_ASSERT
 173 #ifdef ASSERT
 174 #define OPTO_DU_ITERATOR_ASSERT 1
 175 #else


 648     DEFINE_CLASS_ID(Mach,  Node, 1)
 649       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 650         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 651           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 652             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 653               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 654               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 655             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)
 656               DEFINE_CLASS_ID(MachCallLeaf,         MachCallRuntime, 0)
 657       DEFINE_CLASS_ID(MachBranch, Mach, 1)
 658         DEFINE_CLASS_ID(MachIf,         MachBranch, 0)
 659         DEFINE_CLASS_ID(MachGoto,       MachBranch, 1)
 660         DEFINE_CLASS_ID(MachNullCheck,  MachBranch, 2)
 661       DEFINE_CLASS_ID(MachSpillCopy,    Mach, 2)
 662       DEFINE_CLASS_ID(MachTemp,         Mach, 3)
 663       DEFINE_CLASS_ID(MachConstantBase, Mach, 4)
 664       DEFINE_CLASS_ID(MachConstant,     Mach, 5)
 665         DEFINE_CLASS_ID(MachJump,       MachConstant, 0)
 666       DEFINE_CLASS_ID(MachMerge,        Mach, 6)
 667       DEFINE_CLASS_ID(MachMemBar,       Mach, 7)
 668       DEFINE_CLASS_ID(MachProlog,       Mach, 8)
 669 
 670     DEFINE_CLASS_ID(Type,  Node, 2)
 671       DEFINE_CLASS_ID(Phi,   Type, 0)
 672       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
 673         DEFINE_CLASS_ID(CastII, ConstraintCast, 0)
 674         DEFINE_CLASS_ID(CheckCastPP, ConstraintCast, 1)
 675       DEFINE_CLASS_ID(CMove, Type, 3)
 676       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 677       DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
 678         DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
 679         DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
 680       DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
 681         DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
 682         DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 683       DEFINE_CLASS_ID(ValueTypeBase, Type, 8)
 684         DEFINE_CLASS_ID(ValueType, ValueTypeBase, 0)
 685         DEFINE_CLASS_ID(ValueTypePtr, ValueTypeBase, 1)
 686 
 687     DEFINE_CLASS_ID(Proj,  Node, 3)
 688       DEFINE_CLASS_ID(CatchProj, Proj, 0)
 689       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
 690       DEFINE_CLASS_ID(IfProj,    Proj, 2)
 691         DEFINE_CLASS_ID(IfTrue,    IfProj, 0)
 692         DEFINE_CLASS_ID(IfFalse,   IfProj, 1)
 693       DEFINE_CLASS_ID(Parm,      Proj, 4)
 694       DEFINE_CLASS_ID(MachProj,  Proj, 5)
 695 
 696     DEFINE_CLASS_ID(Mem,   Node, 4)
 697       DEFINE_CLASS_ID(Load,  Mem, 0)
 698         DEFINE_CLASS_ID(LoadVector,  Load, 0)
 699         DEFINE_CLASS_ID(LoadBarrierSlowReg, Load, 1)
 700       DEFINE_CLASS_ID(Store, Mem, 1)
 701         DEFINE_CLASS_ID(StoreVector, Store, 0)
 702       DEFINE_CLASS_ID(LoadStore, Mem, 2)
 703         DEFINE_CLASS_ID(LoadStoreConditional, LoadStore, 0)
 704           DEFINE_CLASS_ID(CompareAndSwap, LoadStoreConditional, 0)
 705         DEFINE_CLASS_ID(CompareAndExchangeNode, LoadStore, 1)


 840   DEFINE_CLASS_QUERY(LoadStoreConditional)
 841   DEFINE_CLASS_QUERY(LoadBarrier)
 842   DEFINE_CLASS_QUERY(LoadBarrierSlowReg)
 843   DEFINE_CLASS_QUERY(Lock)
 844   DEFINE_CLASS_QUERY(Loop)
 845   DEFINE_CLASS_QUERY(Mach)
 846   DEFINE_CLASS_QUERY(MachBranch)
 847   DEFINE_CLASS_QUERY(MachCall)
 848   DEFINE_CLASS_QUERY(MachCallDynamicJava)
 849   DEFINE_CLASS_QUERY(MachCallJava)
 850   DEFINE_CLASS_QUERY(MachCallLeaf)
 851   DEFINE_CLASS_QUERY(MachCallRuntime)
 852   DEFINE_CLASS_QUERY(MachCallStaticJava)
 853   DEFINE_CLASS_QUERY(MachConstantBase)
 854   DEFINE_CLASS_QUERY(MachConstant)
 855   DEFINE_CLASS_QUERY(MachGoto)
 856   DEFINE_CLASS_QUERY(MachIf)
 857   DEFINE_CLASS_QUERY(MachJump)
 858   DEFINE_CLASS_QUERY(MachNullCheck)
 859   DEFINE_CLASS_QUERY(MachProj)
 860   DEFINE_CLASS_QUERY(MachProlog)
 861   DEFINE_CLASS_QUERY(MachReturn)
 862   DEFINE_CLASS_QUERY(MachSafePoint)
 863   DEFINE_CLASS_QUERY(MachSpillCopy)
 864   DEFINE_CLASS_QUERY(MachTemp)
 865   DEFINE_CLASS_QUERY(MachMemBar)
 866   DEFINE_CLASS_QUERY(MachMerge)
 867   DEFINE_CLASS_QUERY(Mem)
 868   DEFINE_CLASS_QUERY(MemBar)
 869   DEFINE_CLASS_QUERY(MemBarStoreStore)
 870   DEFINE_CLASS_QUERY(MergeMem)
 871   DEFINE_CLASS_QUERY(Mul)
 872   DEFINE_CLASS_QUERY(Multi)
 873   DEFINE_CLASS_QUERY(MultiBranch)
 874   DEFINE_CLASS_QUERY(OuterStripMinedLoop)
 875   DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
 876   DEFINE_CLASS_QUERY(Parm)
 877   DEFINE_CLASS_QUERY(PCTable)
 878   DEFINE_CLASS_QUERY(Phi)
 879   DEFINE_CLASS_QUERY(Proj)
 880   DEFINE_CLASS_QUERY(Region)
 881   DEFINE_CLASS_QUERY(Root)
 882   DEFINE_CLASS_QUERY(SafePoint)
 883   DEFINE_CLASS_QUERY(SafePointScalarObject)
 884   DEFINE_CLASS_QUERY(Start)
 885   DEFINE_CLASS_QUERY(Store)
 886   DEFINE_CLASS_QUERY(Sub)
 887   DEFINE_CLASS_QUERY(Type)
 888   DEFINE_CLASS_QUERY(ValueType)
 889   DEFINE_CLASS_QUERY(ValueTypeBase)
 890   DEFINE_CLASS_QUERY(ValueTypePtr)
 891   DEFINE_CLASS_QUERY(Vector)
 892   DEFINE_CLASS_QUERY(LoadVector)
 893   DEFINE_CLASS_QUERY(StoreVector)
 894   DEFINE_CLASS_QUERY(Unlock)
 895 
 896   #undef DEFINE_CLASS_QUERY
 897 
 898   // duplicate of is_MachSpillCopy()
 899   bool is_SpillCopy () const {
 900     return ((_class_id & ClassMask_MachSpillCopy) == Class_MachSpillCopy);
 901   }
 902 
 903   bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
 904   // The data node which is safe to leave in dead loop during IGVN optimization.
 905   bool is_dead_loop_safe() const {
 906     return is_Phi() || (is_Proj() && in(0) == NULL) ||
 907            ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
 908             (!is_Proj() || !in(0)->is_Allocate()));
 909   }
 910 


< prev index next >