hotspot/src/share/vm/opto/cfgnode.hpp
changeset 374 585c671c9c0e
parent 247 2aeab9ac7fea
child 769 78e5090c7a20
child 670 ddf3e9583f2f
--- a/hotspot/src/share/vm/opto/cfgnode.hpp	Wed Apr 23 19:09:16 2008 -0700
+++ b/hotspot/src/share/vm/opto/cfgnode.hpp	Thu Apr 24 11:13:03 2008 -0700
@@ -244,6 +244,8 @@
   MultiBranchNode( uint required ) : MultiNode(required) {
     init_class_id(Class_MultiBranch);
   }
+  // returns required number of users to be well formed.
+  virtual int required_outcnt() const = 0;
 };
 
 //------------------------------IfNode-----------------------------------------
@@ -333,6 +335,7 @@
   virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
   virtual const Type *Value( PhaseTransform *phase ) const;
+  virtual int required_outcnt() const { return 2; }
   virtual const RegMask &out_RegMask() const;
   void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
   int is_range_check(Node* &range, Node* &index, jint &offset);
@@ -391,6 +394,7 @@
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
   virtual const Type *bottom_type() const;
   virtual bool pinned() const { return true; }
+  virtual int required_outcnt() const { return _size; }
 };
 
 //------------------------------JumpNode---------------------------------------
@@ -504,7 +508,9 @@
   virtual int Opcode() const;
   virtual bool pinned() const { return true; };
   virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
-
+  virtual const Type *Value( PhaseTransform *phase ) const;
+  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
+  virtual int required_outcnt() const { return 2; }
   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { }
   virtual uint size(PhaseRegAlloc *ra_) const { return 0; }
 #ifndef PRODUCT