src/share/vm/opto/cfgnode.cpp

changeset 619
65fe2bd88839
parent 598
885ed790ecf0
child 631
d1605aabd0a1
child 656
1e026f8da827
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Thu Jun 05 15:43:18 2008 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Thu Jun 05 21:44:53 2008 -0700
     1.3 @@ -1621,64 +1621,6 @@
     1.4      if (opt != NULL)  return opt;
     1.5    }
     1.6  
     1.7 -  if (in(1) != NULL && in(1)->Opcode() == Op_AddP && can_reshape) {
     1.8 -    // Try to undo Phi of AddP:
     1.9 -    //   (Phi (AddP base base y) (AddP base2 base2 y))
    1.10 -    // becomes:
    1.11 -    //   newbase := (Phi base base2)
    1.12 -    //   (AddP newbase newbase y)
    1.13 -    //
    1.14 -    // This occurs as a result of unsuccessful split_thru_phi and
    1.15 -    // interferes with taking advantage of addressing modes.  See the
    1.16 -    // clone_shift_expressions code in matcher.cpp
    1.17 -    Node* addp = in(1);
    1.18 -    const Type* type = addp->in(AddPNode::Base)->bottom_type();
    1.19 -    Node* y = addp->in(AddPNode::Offset);
    1.20 -    if (y != NULL && addp->in(AddPNode::Base) == addp->in(AddPNode::Address)) {
    1.21 -      // make sure that all the inputs are similar to the first one,
    1.22 -      // i.e. AddP with base == address and same offset as first AddP
    1.23 -      bool doit = true;
    1.24 -      for (uint i = 2; i < req(); i++) {
    1.25 -        if (in(i) == NULL ||
    1.26 -            in(i)->Opcode() != Op_AddP ||
    1.27 -            in(i)->in(AddPNode::Base) != in(i)->in(AddPNode::Address) ||
    1.28 -            in(i)->in(AddPNode::Offset) != y) {
    1.29 -          doit = false;
    1.30 -          break;
    1.31 -        }
    1.32 -        // Accumulate type for resulting Phi
    1.33 -        type = type->meet(in(i)->in(AddPNode::Base)->bottom_type());
    1.34 -      }
    1.35 -      Node* base = NULL;
    1.36 -      if (doit) {
    1.37 -        // Check for neighboring AddP nodes in a tree.
    1.38 -        // If they have a base, use that it.
    1.39 -        for (DUIterator_Fast kmax, k = this->fast_outs(kmax); k < kmax; k++) {
    1.40 -          Node* u = this->fast_out(k);
    1.41 -          if (u->is_AddP()) {
    1.42 -            Node* base2 = u->in(AddPNode::Base);
    1.43 -            if (base2 != NULL && !base2->is_top()) {
    1.44 -              if (base == NULL)
    1.45 -                base = base2;
    1.46 -              else if (base != base2)
    1.47 -                { doit = false; break; }
    1.48 -            }
    1.49 -          }
    1.50 -        }
    1.51 -      }
    1.52 -      if (doit) {
    1.53 -        if (base == NULL) {
    1.54 -          base = new (phase->C, in(0)->req()) PhiNode(in(0), type, NULL);
    1.55 -          for (uint i = 1; i < req(); i++) {
    1.56 -            base->init_req(i, in(i)->in(AddPNode::Base));
    1.57 -          }
    1.58 -          phase->is_IterGVN()->register_new_node_with_optimizer(base);
    1.59 -        }
    1.60 -        return new (phase->C, 4) AddPNode(base, base, y);
    1.61 -      }
    1.62 -    }
    1.63 -  }
    1.64 -
    1.65    // Split phis through memory merges, so that the memory merges will go away.
    1.66    // Piggy-back this transformation on the search for a unique input....
    1.67    // It will be as if the merged memory is the unique value of the phi.

mercurial