Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/addnode.cpp @ 1543:1a1603f975b5
Merge
author | kvn |
---|---|
date | Wed, 19 May 2010 10:22:39 -0700 |
parents | b5fdf39b9749 |
children | c18cbe5936b8 |
line wrap: on
line diff
--- a/src/share/vm/opto/addnode.cpp Mon Apr 05 10:17:15 2010 -0700 +++ b/src/share/vm/opto/addnode.cpp Wed May 19 10:22:39 2010 -0700 @@ -714,71 +714,6 @@ return idx > Base; } -//---------------------------mach_bottom_type---------------------------------- -// Utility function for use by ADLC. Implements bottom_type for matched AddP. -const Type *AddPNode::mach_bottom_type( const MachNode* n) { - Node* base = n->in(Base); - const Type *t = base->bottom_type(); - if ( t == Type::TOP ) { - // an untyped pointer - return TypeRawPtr::BOTTOM; - } - const TypePtr* tp = t->isa_oopptr(); - if ( tp == NULL ) return t; - if ( tp->_offset == TypePtr::OffsetBot ) return tp; - - // We must carefully add up the various offsets... - intptr_t offset = 0; - const TypePtr* tptr = NULL; - - uint numopnds = n->num_opnds(); - uint index = n->oper_input_base(); - for ( uint i = 1; i < numopnds; i++ ) { - MachOper *opnd = n->_opnds[i]; - // Check for any interesting operand info. - // In particular, check for both memory and non-memory operands. - // %%%%% Clean this up: use xadd_offset - intptr_t con = opnd->constant(); - if ( con == TypePtr::OffsetBot ) goto bottom_out; - offset += con; - con = opnd->constant_disp(); - if ( con == TypePtr::OffsetBot ) goto bottom_out; - offset += con; - if( opnd->scale() != 0 ) goto bottom_out; - - // Check each operand input edge. Find the 1 allowed pointer - // edge. Other edges must be index edges; track exact constant - // inputs and otherwise assume the worst. - for ( uint j = opnd->num_edges(); j > 0; j-- ) { - Node* edge = n->in(index++); - const Type* et = edge->bottom_type(); - const TypeX* eti = et->isa_intptr_t(); - if ( eti == NULL ) { - // there must be one pointer among the operands - guarantee(tptr == NULL, "must be only one pointer operand"); - if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { - // 32-bits narrow oop can be the base of address expressions - tptr = et->make_ptr()->isa_oopptr(); - } else { - // only regular oops are expected here - tptr = et->isa_oopptr(); - } - guarantee(tptr != NULL, "non-int operand must be pointer"); - if (tptr->higher_equal(tp->add_offset(tptr->offset()))) - tp = tptr; // Set more precise type for bailout - continue; - } - if ( eti->_hi != eti->_lo ) goto bottom_out; - offset += eti->_lo; - } - } - guarantee(tptr != NULL, "must be exactly one pointer operand"); - return tptr->add_offset(offset); - - bottom_out: - return tp->add_offset(TypePtr::OffsetBot); -} - //============================================================================= //------------------------------Identity--------------------------------------- Node *OrINode::Identity( PhaseTransform *phase ) {