src/share/vm/opto/cfgnode.cpp

changeset 803
36ccc817fca4
parent 802
194b8e3a2fc4
child 835
cc80376deb0c
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Wed Sep 17 12:59:52 2008 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Tue Sep 23 12:29:06 2008 -0700
     1.3 @@ -1769,6 +1769,51 @@
     1.4      }
     1.5    }
     1.6  
     1.7 +#ifdef _LP64
     1.8 +  // Push DecodeN down through phi.
     1.9 +  // The rest of phi graph will transform by split EncodeP node though phis up.
    1.10 +  if (UseCompressedOops && can_reshape && progress == NULL) {
    1.11 +    bool may_push = true;
    1.12 +    bool has_decodeN = false;
    1.13 +    Node* in_decodeN = NULL;
    1.14 +    for (uint i=1; i<req(); ++i) {// For all paths in
    1.15 +      Node *ii = in(i);
    1.16 +      if (ii->is_DecodeN() && ii->bottom_type() == bottom_type()) {
    1.17 +        has_decodeN = true;
    1.18 +        in_decodeN = ii->in(1);
    1.19 +      } else if (!ii->is_Phi()) {
    1.20 +        may_push = false;
    1.21 +      }
    1.22 +    }
    1.23 +
    1.24 +    if (has_decodeN && may_push) {
    1.25 +      PhaseIterGVN *igvn = phase->is_IterGVN();
    1.26 +      // Note: in_decodeN is used only to define the type of new phi here.
    1.27 +      PhiNode *new_phi = PhiNode::make_blank(in(0), in_decodeN);
    1.28 +      uint orig_cnt = req();
    1.29 +      for (uint i=1; i<req(); ++i) {// For all paths in
    1.30 +        Node *ii = in(i);
    1.31 +        Node* new_ii = NULL;
    1.32 +        if (ii->is_DecodeN()) {
    1.33 +          assert(ii->bottom_type() == bottom_type(), "sanity");
    1.34 +          new_ii = ii->in(1);
    1.35 +        } else {
    1.36 +          assert(ii->is_Phi(), "sanity");
    1.37 +          if (ii->as_Phi() == this) {
    1.38 +            new_ii = new_phi;
    1.39 +          } else {
    1.40 +            new_ii = new (phase->C, 2) EncodePNode(ii, in_decodeN->bottom_type());
    1.41 +            igvn->register_new_node_with_optimizer(new_ii);
    1.42 +          }
    1.43 +        }
    1.44 +        new_phi->set_req(i, new_ii);
    1.45 +      }
    1.46 +      igvn->register_new_node_with_optimizer(new_phi, this);
    1.47 +      progress = new (phase->C, 2) DecodeNNode(new_phi, bottom_type());
    1.48 +    }
    1.49 +  }
    1.50 +#endif
    1.51 +
    1.52    return progress;              // Return any progress
    1.53  }
    1.54  

mercurial