src/share/vm/opto/node.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/node.hpp

Print this page
rev 6807 : 7173584: Implement arraycopy as a macro node
Summary: delay the conversion of arraycopy to stub calls to macro expansion
Reviewed-by:


  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_NODE_HPP
  26 #define SHARE_VM_OPTO_NODE_HPP
  27 
  28 #include "libadt/vectset.hpp"
  29 #include "opto/compile.hpp"
  30 #include "opto/type.hpp"
  31 
  32 // Portions of code courtesy of Clifford Click
  33 
  34 // Optimization - Graph Style
  35 
  36 
  37 class AbstractLockNode;
  38 class AddNode;
  39 class AddPNode;
  40 class AliasInfo;
  41 class AllocateArrayNode;
  42 class AllocateNode;

  43 class Block;
  44 class BoolNode;
  45 class BoxLockNode;
  46 class CMoveNode;
  47 class CallDynamicJavaNode;
  48 class CallJavaNode;
  49 class CallLeafNode;
  50 class CallNode;
  51 class CallRuntimeNode;
  52 class CallStaticJavaNode;
  53 class CatchNode;
  54 class CatchProjNode;
  55 class CheckCastPPNode;
  56 class ClearArrayNode;
  57 class CmpNode;
  58 class CodeBuffer;
  59 class ConstraintCastNode;
  60 class ConNode;
  61 class CountedLoopNode;
  62 class CountedLoopEndNode;


 544   // This enum is used only for C2 ideal and mach nodes with is_<node>() methods
 545   // so that it's values fits into 16 bits.
 546   enum NodeClasses {
 547     Bit_Node   = 0x0000,
 548     Class_Node = 0x0000,
 549     ClassMask_Node = 0xFFFF,
 550 
 551     DEFINE_CLASS_ID(Multi, Node, 0)
 552       DEFINE_CLASS_ID(SafePoint, Multi, 0)
 553         DEFINE_CLASS_ID(Call,      SafePoint, 0)
 554           DEFINE_CLASS_ID(CallJava,         Call, 0)
 555             DEFINE_CLASS_ID(CallStaticJava,   CallJava, 0)
 556             DEFINE_CLASS_ID(CallDynamicJava,  CallJava, 1)
 557           DEFINE_CLASS_ID(CallRuntime,      Call, 1)
 558             DEFINE_CLASS_ID(CallLeaf,         CallRuntime, 0)
 559           DEFINE_CLASS_ID(Allocate,         Call, 2)
 560             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 561           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 562             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 563             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)

 564       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 565         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 566           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 567           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 568         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 569           DEFINE_CLASS_ID(CountedLoopEnd, If, 0)
 570         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 571       DEFINE_CLASS_ID(Start,       Multi, 2)
 572       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 573         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 574         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 575 
 576     DEFINE_CLASS_ID(Mach,  Node, 1)
 577       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 578         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 579           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 580             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 581               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 582               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 583             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)


 690   virtual uint size_of() const;
 691 
 692   // Other interesting Node properties
 693   #define DEFINE_CLASS_QUERY(type)                           \
 694   bool is_##type() const {                                   \
 695     return ((_class_id & ClassMask_##type) == Class_##type); \
 696   }                                                          \
 697   type##Node *as_##type() const {                            \
 698     assert(is_##type(), "invalid node class");               \
 699     return (type##Node*)this;                                \
 700   }                                                          \
 701   type##Node* isa_##type() const {                           \
 702     return (is_##type()) ? as_##type() : NULL;               \
 703   }
 704 
 705   DEFINE_CLASS_QUERY(AbstractLock)
 706   DEFINE_CLASS_QUERY(Add)
 707   DEFINE_CLASS_QUERY(AddP)
 708   DEFINE_CLASS_QUERY(Allocate)
 709   DEFINE_CLASS_QUERY(AllocateArray)

 710   DEFINE_CLASS_QUERY(Bool)
 711   DEFINE_CLASS_QUERY(BoxLock)
 712   DEFINE_CLASS_QUERY(Call)
 713   DEFINE_CLASS_QUERY(CallDynamicJava)
 714   DEFINE_CLASS_QUERY(CallJava)
 715   DEFINE_CLASS_QUERY(CallLeaf)
 716   DEFINE_CLASS_QUERY(CallRuntime)
 717   DEFINE_CLASS_QUERY(CallStaticJava)
 718   DEFINE_CLASS_QUERY(Catch)
 719   DEFINE_CLASS_QUERY(CatchProj)
 720   DEFINE_CLASS_QUERY(CheckCastPP)
 721   DEFINE_CLASS_QUERY(ConstraintCast)
 722   DEFINE_CLASS_QUERY(ClearArray)
 723   DEFINE_CLASS_QUERY(CMove)
 724   DEFINE_CLASS_QUERY(Cmp)
 725   DEFINE_CLASS_QUERY(CountedLoop)
 726   DEFINE_CLASS_QUERY(CountedLoopEnd)
 727   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 728   DEFINE_CLASS_QUERY(DecodeN)
 729   DEFINE_CLASS_QUERY(DecodeNKlass)




  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_NODE_HPP
  26 #define SHARE_VM_OPTO_NODE_HPP
  27 
  28 #include "libadt/vectset.hpp"
  29 #include "opto/compile.hpp"
  30 #include "opto/type.hpp"
  31 
  32 // Portions of code courtesy of Clifford Click
  33 
  34 // Optimization - Graph Style
  35 
  36 
  37 class AbstractLockNode;
  38 class AddNode;
  39 class AddPNode;
  40 class AliasInfo;
  41 class AllocateArrayNode;
  42 class AllocateNode;
  43 class ArrayCopyNode;
  44 class Block;
  45 class BoolNode;
  46 class BoxLockNode;
  47 class CMoveNode;
  48 class CallDynamicJavaNode;
  49 class CallJavaNode;
  50 class CallLeafNode;
  51 class CallNode;
  52 class CallRuntimeNode;
  53 class CallStaticJavaNode;
  54 class CatchNode;
  55 class CatchProjNode;
  56 class CheckCastPPNode;
  57 class ClearArrayNode;
  58 class CmpNode;
  59 class CodeBuffer;
  60 class ConstraintCastNode;
  61 class ConNode;
  62 class CountedLoopNode;
  63 class CountedLoopEndNode;


 545   // This enum is used only for C2 ideal and mach nodes with is_<node>() methods
 546   // so that it's values fits into 16 bits.
 547   enum NodeClasses {
 548     Bit_Node   = 0x0000,
 549     Class_Node = 0x0000,
 550     ClassMask_Node = 0xFFFF,
 551 
 552     DEFINE_CLASS_ID(Multi, Node, 0)
 553       DEFINE_CLASS_ID(SafePoint, Multi, 0)
 554         DEFINE_CLASS_ID(Call,      SafePoint, 0)
 555           DEFINE_CLASS_ID(CallJava,         Call, 0)
 556             DEFINE_CLASS_ID(CallStaticJava,   CallJava, 0)
 557             DEFINE_CLASS_ID(CallDynamicJava,  CallJava, 1)
 558           DEFINE_CLASS_ID(CallRuntime,      Call, 1)
 559             DEFINE_CLASS_ID(CallLeaf,         CallRuntime, 0)
 560           DEFINE_CLASS_ID(Allocate,         Call, 2)
 561             DEFINE_CLASS_ID(AllocateArray,    Allocate, 0)
 562           DEFINE_CLASS_ID(AbstractLock,     Call, 3)
 563             DEFINE_CLASS_ID(Lock,             AbstractLock, 0)
 564             DEFINE_CLASS_ID(Unlock,           AbstractLock, 1)
 565           DEFINE_CLASS_ID(ArrayCopy,        Call, 4)
 566       DEFINE_CLASS_ID(MultiBranch, Multi, 1)
 567         DEFINE_CLASS_ID(PCTable,     MultiBranch, 0)
 568           DEFINE_CLASS_ID(Catch,       PCTable, 0)
 569           DEFINE_CLASS_ID(Jump,        PCTable, 1)
 570         DEFINE_CLASS_ID(If,          MultiBranch, 1)
 571           DEFINE_CLASS_ID(CountedLoopEnd, If, 0)
 572         DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2)
 573       DEFINE_CLASS_ID(Start,       Multi, 2)
 574       DEFINE_CLASS_ID(MemBar,      Multi, 3)
 575         DEFINE_CLASS_ID(Initialize,       MemBar, 0)
 576         DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
 577 
 578     DEFINE_CLASS_ID(Mach,  Node, 1)
 579       DEFINE_CLASS_ID(MachReturn, Mach, 0)
 580         DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0)
 581           DEFINE_CLASS_ID(MachCall, MachSafePoint, 0)
 582             DEFINE_CLASS_ID(MachCallJava,         MachCall, 0)
 583               DEFINE_CLASS_ID(MachCallStaticJava,   MachCallJava, 0)
 584               DEFINE_CLASS_ID(MachCallDynamicJava,  MachCallJava, 1)
 585             DEFINE_CLASS_ID(MachCallRuntime,      MachCall, 1)


 692   virtual uint size_of() const;
 693 
 694   // Other interesting Node properties
 695   #define DEFINE_CLASS_QUERY(type)                           \
 696   bool is_##type() const {                                   \
 697     return ((_class_id & ClassMask_##type) == Class_##type); \
 698   }                                                          \
 699   type##Node *as_##type() const {                            \
 700     assert(is_##type(), "invalid node class");               \
 701     return (type##Node*)this;                                \
 702   }                                                          \
 703   type##Node* isa_##type() const {                           \
 704     return (is_##type()) ? as_##type() : NULL;               \
 705   }
 706 
 707   DEFINE_CLASS_QUERY(AbstractLock)
 708   DEFINE_CLASS_QUERY(Add)
 709   DEFINE_CLASS_QUERY(AddP)
 710   DEFINE_CLASS_QUERY(Allocate)
 711   DEFINE_CLASS_QUERY(AllocateArray)
 712   DEFINE_CLASS_QUERY(ArrayCopy)
 713   DEFINE_CLASS_QUERY(Bool)
 714   DEFINE_CLASS_QUERY(BoxLock)
 715   DEFINE_CLASS_QUERY(Call)
 716   DEFINE_CLASS_QUERY(CallDynamicJava)
 717   DEFINE_CLASS_QUERY(CallJava)
 718   DEFINE_CLASS_QUERY(CallLeaf)
 719   DEFINE_CLASS_QUERY(CallRuntime)
 720   DEFINE_CLASS_QUERY(CallStaticJava)
 721   DEFINE_CLASS_QUERY(Catch)
 722   DEFINE_CLASS_QUERY(CatchProj)
 723   DEFINE_CLASS_QUERY(CheckCastPP)
 724   DEFINE_CLASS_QUERY(ConstraintCast)
 725   DEFINE_CLASS_QUERY(ClearArray)
 726   DEFINE_CLASS_QUERY(CMove)
 727   DEFINE_CLASS_QUERY(Cmp)
 728   DEFINE_CLASS_QUERY(CountedLoop)
 729   DEFINE_CLASS_QUERY(CountedLoopEnd)
 730   DEFINE_CLASS_QUERY(DecodeNarrowPtr)
 731   DEFINE_CLASS_QUERY(DecodeN)
 732   DEFINE_CLASS_QUERY(DecodeNKlass)


src/share/vm/opto/node.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File