Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/cfgnode.hpp @ 127:e0bd2e08e3d0
6663848: assert(i < Max(),"oob") in C2 with -Xcomp
Summary: NeverBranchNodes aren't handled properly
Reviewed-by: kvn, sgoldman, rasbold, jrose
author | never |
---|---|
date | Thu, 24 Apr 2008 11:13:03 -0700 |
parents | 2a9af0b9cb1c |
children | d1605aabd0a1 1dd146f17531 |
line wrap: on
line diff
--- a/src/share/vm/opto/cfgnode.hpp Wed Apr 23 19:09:16 2008 -0700 +++ b/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