src/share/vm/opto/addnode.cpp

changeset 1896
b5fdf39b9749
parent 1279
bd02caa94611
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/opto/addnode.cpp	Tue May 18 13:45:03 2010 -0700
     1.2 +++ b/src/share/vm/opto/addnode.cpp	Tue May 18 23:58:32 2010 -0700
     1.3 @@ -714,71 +714,6 @@
     1.4    return idx > Base;
     1.5  }
     1.6  
     1.7 -//---------------------------mach_bottom_type----------------------------------
     1.8 -// Utility function for use by ADLC.  Implements bottom_type for matched AddP.
     1.9 -const Type *AddPNode::mach_bottom_type( const MachNode* n) {
    1.10 -  Node* base = n->in(Base);
    1.11 -  const Type *t = base->bottom_type();
    1.12 -  if ( t == Type::TOP ) {
    1.13 -    // an untyped pointer
    1.14 -    return TypeRawPtr::BOTTOM;
    1.15 -  }
    1.16 -  const TypePtr* tp = t->isa_oopptr();
    1.17 -  if ( tp == NULL )  return t;
    1.18 -  if ( tp->_offset == TypePtr::OffsetBot )  return tp;
    1.19 -
    1.20 -  // We must carefully add up the various offsets...
    1.21 -  intptr_t offset = 0;
    1.22 -  const TypePtr* tptr = NULL;
    1.23 -
    1.24 -  uint numopnds = n->num_opnds();
    1.25 -  uint index = n->oper_input_base();
    1.26 -  for ( uint i = 1; i < numopnds; i++ ) {
    1.27 -    MachOper *opnd = n->_opnds[i];
    1.28 -    // Check for any interesting operand info.
    1.29 -    // In particular, check for both memory and non-memory operands.
    1.30 -    // %%%%% Clean this up: use xadd_offset
    1.31 -    intptr_t con = opnd->constant();
    1.32 -    if ( con == TypePtr::OffsetBot )  goto bottom_out;
    1.33 -    offset += con;
    1.34 -    con = opnd->constant_disp();
    1.35 -    if ( con == TypePtr::OffsetBot )  goto bottom_out;
    1.36 -    offset += con;
    1.37 -    if( opnd->scale() != 0 ) goto bottom_out;
    1.38 -
    1.39 -    // Check each operand input edge.  Find the 1 allowed pointer
    1.40 -    // edge.  Other edges must be index edges; track exact constant
    1.41 -    // inputs and otherwise assume the worst.
    1.42 -    for ( uint j = opnd->num_edges(); j > 0; j-- ) {
    1.43 -      Node* edge = n->in(index++);
    1.44 -      const Type*    et  = edge->bottom_type();
    1.45 -      const TypeX*   eti = et->isa_intptr_t();
    1.46 -      if ( eti == NULL ) {
    1.47 -        // there must be one pointer among the operands
    1.48 -        guarantee(tptr == NULL, "must be only one pointer operand");
    1.49 -        if (UseCompressedOops && Universe::narrow_oop_shift() == 0) {
    1.50 -          // 32-bits narrow oop can be the base of address expressions
    1.51 -          tptr = et->make_ptr()->isa_oopptr();
    1.52 -        } else {
    1.53 -          // only regular oops are expected here
    1.54 -          tptr = et->isa_oopptr();
    1.55 -        }
    1.56 -        guarantee(tptr != NULL, "non-int operand must be pointer");
    1.57 -        if (tptr->higher_equal(tp->add_offset(tptr->offset())))
    1.58 -          tp = tptr; // Set more precise type for bailout
    1.59 -        continue;
    1.60 -      }
    1.61 -      if ( eti->_hi != eti->_lo )  goto bottom_out;
    1.62 -      offset += eti->_lo;
    1.63 -    }
    1.64 -  }
    1.65 -  guarantee(tptr != NULL, "must be exactly one pointer operand");
    1.66 -  return tptr->add_offset(offset);
    1.67 -
    1.68 - bottom_out:
    1.69 -  return tp->add_offset(TypePtr::OffsetBot);
    1.70 -}
    1.71 -
    1.72  //=============================================================================
    1.73  //------------------------------Identity---------------------------------------
    1.74  Node *OrINode::Identity( PhaseTransform *phase ) {

mercurial