src/share/vm/opto/machnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8031320_8u Sdiff src/share/vm/opto

src/share/vm/opto/machnode.hpp

Print this page
rev 5968 : 8031320: Use Intel RTM instructions for locks
Summary: Use RTM for inflated locks and stack locks.
Reviewed-by: iveresov, twisti, roland, dcubed


  35 class CodeBuffer;
  36 class JVMState;
  37 class MachCallDynamicJavaNode;
  38 class MachCallJavaNode;
  39 class MachCallLeafNode;
  40 class MachCallNode;
  41 class MachCallRuntimeNode;
  42 class MachCallStaticJavaNode;
  43 class MachEpilogNode;
  44 class MachIfNode;
  45 class MachNullCheckNode;
  46 class MachOper;
  47 class MachProjNode;
  48 class MachPrologNode;
  49 class MachReturnNode;
  50 class MachSafePointNode;
  51 class MachSpillCopyNode;
  52 class Matcher;
  53 class PhaseRegAlloc;
  54 class RegMask;

  55 class State;
  56 
  57 //---------------------------MachOper------------------------------------------
  58 class MachOper : public ResourceObj {
  59 public:
  60   // Allocate right next to the MachNodes in the same arena
  61   void *operator new( size_t x, Compile* C ) throw() { return C->node_arena()->Amalloc_D(x); }
  62 
  63   // Opcode
  64   virtual uint opcode() const = 0;
  65 
  66   // Number of input edges.
  67   // Generally at least 1
  68   virtual uint num_edges() const { return 1; }
  69   // Array of Register masks
  70   virtual const RegMask *in_RegMask(int index) const;
  71 
  72   // Methods to output the encoding of the operand
  73 
  74   // Negate conditional branches.  Error for non-branch Nodes


 604 #ifndef PRODUCT
 605   virtual void dump_spec(outputStream *st) const;
 606 #endif
 607 };
 608 
 609 //------------------------------MachGotoNode-----------------------------------
 610 // Machine-specific versions of GotoNodes
 611 class MachGotoNode : public MachBranchNode {
 612 public:
 613   MachGotoNode() : MachBranchNode() {
 614     init_class_id(Class_MachGoto);
 615   }
 616 };
 617 
 618 //------------------------------MachFastLockNode-------------------------------------
 619 // Machine-specific versions of FastLockNodes
 620 class MachFastLockNode : public MachNode {
 621   virtual uint size_of() const { return sizeof(*this); } // Size is bigger
 622 public:
 623   BiasedLockingCounters* _counters;
 624 

 625   MachFastLockNode() : MachNode() {}
 626 };
 627 
 628 //------------------------------MachReturnNode--------------------------------
 629 // Machine-specific versions of subroutine returns
 630 class MachReturnNode : public MachNode {
 631   virtual uint size_of() const; // Size is bigger
 632 public:
 633   RegMask *_in_rms;             // Input register masks, set during allocation
 634   ReallocMark _nesting;         // assertion check for reallocations
 635   const TypePtr* _adr_type;     // memory effects of call or return
 636   MachReturnNode() : MachNode() {
 637     init_class_id(Class_MachReturn);
 638     _adr_type = TypePtr::BOTTOM; // the default: all of memory
 639   }
 640 
 641   void set_adr_type(const TypePtr* atp) { _adr_type = atp; }
 642 
 643   virtual const RegMask &in_RegMask(uint) const;
 644   virtual bool pinned() const { return true; };




  35 class CodeBuffer;
  36 class JVMState;
  37 class MachCallDynamicJavaNode;
  38 class MachCallJavaNode;
  39 class MachCallLeafNode;
  40 class MachCallNode;
  41 class MachCallRuntimeNode;
  42 class MachCallStaticJavaNode;
  43 class MachEpilogNode;
  44 class MachIfNode;
  45 class MachNullCheckNode;
  46 class MachOper;
  47 class MachProjNode;
  48 class MachPrologNode;
  49 class MachReturnNode;
  50 class MachSafePointNode;
  51 class MachSpillCopyNode;
  52 class Matcher;
  53 class PhaseRegAlloc;
  54 class RegMask;
  55 class RTMLockingCounters;
  56 class State;
  57 
  58 //---------------------------MachOper------------------------------------------
  59 class MachOper : public ResourceObj {
  60 public:
  61   // Allocate right next to the MachNodes in the same arena
  62   void *operator new( size_t x, Compile* C ) throw() { return C->node_arena()->Amalloc_D(x); }
  63 
  64   // Opcode
  65   virtual uint opcode() const = 0;
  66 
  67   // Number of input edges.
  68   // Generally at least 1
  69   virtual uint num_edges() const { return 1; }
  70   // Array of Register masks
  71   virtual const RegMask *in_RegMask(int index) const;
  72 
  73   // Methods to output the encoding of the operand
  74 
  75   // Negate conditional branches.  Error for non-branch Nodes


 605 #ifndef PRODUCT
 606   virtual void dump_spec(outputStream *st) const;
 607 #endif
 608 };
 609 
 610 //------------------------------MachGotoNode-----------------------------------
 611 // Machine-specific versions of GotoNodes
 612 class MachGotoNode : public MachBranchNode {
 613 public:
 614   MachGotoNode() : MachBranchNode() {
 615     init_class_id(Class_MachGoto);
 616   }
 617 };
 618 
 619 //------------------------------MachFastLockNode-------------------------------------
 620 // Machine-specific versions of FastLockNodes
 621 class MachFastLockNode : public MachNode {
 622   virtual uint size_of() const { return sizeof(*this); } // Size is bigger
 623 public:
 624   BiasedLockingCounters*        _counters;
 625   RTMLockingCounters*       _rtm_counters; // RTM lock counters for inflated locks
 626   RTMLockingCounters* _stack_rtm_counters; // RTM lock counters for stack locks
 627   MachFastLockNode() : MachNode() {}
 628 };
 629 
 630 //------------------------------MachReturnNode--------------------------------
 631 // Machine-specific versions of subroutine returns
 632 class MachReturnNode : public MachNode {
 633   virtual uint size_of() const; // Size is bigger
 634 public:
 635   RegMask *_in_rms;             // Input register masks, set during allocation
 636   ReallocMark _nesting;         // assertion check for reallocations
 637   const TypePtr* _adr_type;     // memory effects of call or return
 638   MachReturnNode() : MachNode() {
 639     init_class_id(Class_MachReturn);
 640     _adr_type = TypePtr::BOTTOM; // the default: all of memory
 641   }
 642 
 643   void set_adr_type(const TypePtr* atp) { _adr_type = atp; }
 644 
 645   virtual const RegMask &in_RegMask(uint) const;
 646   virtual bool pinned() const { return true; };


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