< prev index next >

src/hotspot/share/opto/cfgnode.hpp

Print this page

 30 #include "opto/opcodes.hpp"
 31 #include "opto/type.hpp"
 32 
 33 // Portions of code courtesy of Clifford Click
 34 
 35 // Optimization - Graph Style
 36 
 37 class Matcher;
 38 class Node;
 39 class   RegionNode;
 40 class   TypeNode;
 41 class     PhiNode;
 42 class   GotoNode;
 43 class   MultiNode;
 44 class     MultiBranchNode;
 45 class       IfNode;
 46 class       PCTableNode;
 47 class         JumpNode;
 48 class         CatchNode;
 49 class       NeverBranchNode;

 50 class   ProjNode;
 51 class     CProjNode;
 52 class       IfTrueNode;
 53 class       IfFalseNode;
 54 class       CatchProjNode;
 55 class     JProjNode;
 56 class       JumpProjNode;
 57 class     SCMemProjNode;
 58 class PhaseIdealLoop;
 59 
 60 //------------------------------RegionNode-------------------------------------
 61 // The class of RegionNodes, which can be mapped to basic blocks in the
 62 // program.  Their inputs point to Control sources.  PhiNodes (described
 63 // below) have an input point to a RegionNode.  Merged data inputs to PhiNodes
 64 // correspond 1-to-1 with RegionNode inputs.  The zero input of a PhiNode is
 65 // the RegionNode, and the zero input of the RegionNode is itself.
 66 class RegionNode : public Node {
 67 private:
 68   bool _is_unreachable_region;
 69 

587 //------------------------------NeverBranchNode-------------------------------
588 // The never-taken branch.  Used to give the appearance of exiting infinite
589 // loops to those algorithms that like all paths to be reachable.  Encodes
590 // empty.
591 class NeverBranchNode : public MultiBranchNode {
592 public:
593   NeverBranchNode( Node *ctrl ) : MultiBranchNode(1) { init_req(0,ctrl); }
594   virtual int Opcode() const;
595   virtual bool pinned() const { return true; };
596   virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
597   virtual const Type* Value(PhaseGVN* phase) const;
598   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
599   virtual int required_outcnt() const { return 2; }
600   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { }
601   virtual uint size(PhaseRegAlloc *ra_) const { return 0; }
602 #ifndef PRODUCT
603   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
604 #endif
605 };
606 
























607 #endif // SHARE_OPTO_CFGNODE_HPP

 30 #include "opto/opcodes.hpp"
 31 #include "opto/type.hpp"
 32 
 33 // Portions of code courtesy of Clifford Click
 34 
 35 // Optimization - Graph Style
 36 
 37 class Matcher;
 38 class Node;
 39 class   RegionNode;
 40 class   TypeNode;
 41 class     PhiNode;
 42 class   GotoNode;
 43 class   MultiNode;
 44 class     MultiBranchNode;
 45 class       IfNode;
 46 class       PCTableNode;
 47 class         JumpNode;
 48 class         CatchNode;
 49 class       NeverBranchNode;
 50 class     BlackholeNode;
 51 class   ProjNode;
 52 class     CProjNode;
 53 class       IfTrueNode;
 54 class       IfFalseNode;
 55 class       CatchProjNode;
 56 class     JProjNode;
 57 class       JumpProjNode;
 58 class     SCMemProjNode;
 59 class PhaseIdealLoop;
 60 
 61 //------------------------------RegionNode-------------------------------------
 62 // The class of RegionNodes, which can be mapped to basic blocks in the
 63 // program.  Their inputs point to Control sources.  PhiNodes (described
 64 // below) have an input point to a RegionNode.  Merged data inputs to PhiNodes
 65 // correspond 1-to-1 with RegionNode inputs.  The zero input of a PhiNode is
 66 // the RegionNode, and the zero input of the RegionNode is itself.
 67 class RegionNode : public Node {
 68 private:
 69   bool _is_unreachable_region;
 70 

588 //------------------------------NeverBranchNode-------------------------------
589 // The never-taken branch.  Used to give the appearance of exiting infinite
590 // loops to those algorithms that like all paths to be reachable.  Encodes
591 // empty.
592 class NeverBranchNode : public MultiBranchNode {
593 public:
594   NeverBranchNode( Node *ctrl ) : MultiBranchNode(1) { init_req(0,ctrl); }
595   virtual int Opcode() const;
596   virtual bool pinned() const { return true; };
597   virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
598   virtual const Type* Value(PhaseGVN* phase) const;
599   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
600   virtual int required_outcnt() const { return 2; }
601   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { }
602   virtual uint size(PhaseRegAlloc *ra_) const { return 0; }
603 #ifndef PRODUCT
604   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
605 #endif
606 };
607 
608 //------------------------------BlackholeNode----------------------------
609 // Blackhole all arguments. This node would survive through the compiler
610 // the effects on its arguments, and would be finally matched to nothing.
611 class BlackholeNode : public MultiNode {
612 public:
613   BlackholeNode(Node* ctrl) : MultiNode(1) {
614     init_req(TypeFunc::Control, ctrl);
615   }
616   virtual int   Opcode() const;
617   virtual uint ideal_reg() const { return 0; } // not matched in the AD file
618   virtual const Type* bottom_type() const { return TypeTuple::MEMBAR; }
619 
620   const RegMask &in_RegMask(uint idx) const {
621     // Fake the incoming arguments mask for blackholes: accept all registers
622     // and all stack slots. This would avoid any redundant register moves
623     // for blackhole inputs.
624     return RegMask::All;
625   }
626 #ifndef PRODUCT
627   virtual void format(PhaseRegAlloc* ra, outputStream* st) const;
628 #endif
629 };
630 
631 
632 #endif // SHARE_OPTO_CFGNODE_HPP
< prev index next >