src/share/vm/opto/cfgnode.cpp

changeset 562
e0bd2e08e3d0
parent 561
72f4a668df19
child 598
885ed790ecf0
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Wed Apr 23 19:09:16 2008 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Thu Apr 24 11:13:03 2008 -0700
     1.3 @@ -2019,6 +2019,28 @@
     1.4  }
     1.5  
     1.6  //=============================================================================
     1.7 +//------------------------------Value------------------------------------------
     1.8 +// Check for being unreachable.
     1.9 +const Type *NeverBranchNode::Value( PhaseTransform *phase ) const {
    1.10 +  if (!in(0) || in(0)->is_top()) return Type::TOP;
    1.11 +  return bottom_type();
    1.12 +}
    1.13 +
    1.14 +//------------------------------Ideal------------------------------------------
    1.15 +// Check for no longer being part of a loop
    1.16 +Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) {
    1.17 +  if (can_reshape && !in(0)->is_Loop()) {
    1.18 +    // Dead code elimination can sometimes delete this projection so
    1.19 +    // if it's not there, there's nothing to do.
    1.20 +    Node* fallthru = proj_out(0);
    1.21 +    if (fallthru != NULL) {
    1.22 +      phase->is_IterGVN()->subsume_node(fallthru, in(0));
    1.23 +    }
    1.24 +    return phase->C->top();
    1.25 +  }
    1.26 +  return NULL;
    1.27 +}
    1.28 +
    1.29  #ifndef PRODUCT
    1.30  void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
    1.31    st->print("%s", Name());

mercurial