src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/cfgnode.cpp Thu Jul 30 13:22:14 2009
--- new/src/share/vm/opto/cfgnode.cpp Thu Jul 30 13:22:14 2009
*** 1790,1817 ****
--- 1790,1816 ----
// Push DecodeN down through phi.
// The rest of phi graph will transform by split EncodeP node though phis up.
if (UseCompressedOops && can_reshape && progress == NULL) {
bool may_push = true;
bool has_decodeN = false;
Node* in_decodeN = NULL;
for (uint i=1; i<req(); ++i) {// For all paths in
Node *ii = in(i);
if (ii->is_DecodeN() && ii->bottom_type() == bottom_type()) {
! // Note: in_decodeN is used only to define the type of new phi.
// Find a non dead path otherwise phi type will be wrong.
! // Do optimization if a non dead path exist.
if (ii->in(1)->bottom_type() != Type::TOP) {
has_decodeN = true;
in_decodeN = ii->in(1);
}
} else if (!ii->is_Phi()) {
may_push = false;
}
}
if (has_decodeN && may_push) {
PhaseIterGVN *igvn = phase->is_IterGVN();
PhiNode *new_phi = PhiNode::make_blank(in(0), in_decodeN);
+ // Make narrow type for new phi.
+ const Type* narrow_t = TypeNarrowOop::make(this->bottom_type()->is_ptr());
+ PhiNode* new_phi = new (phase->C, r->req()) PhiNode(r, narrow_t);
uint orig_cnt = req();
for (uint i=1; i<req(); ++i) {// For all paths in
Node *ii = in(i);
Node* new_ii = NULL;
if (ii->is_DecodeN()) {
*** 1820,1830 ****
--- 1819,1829 ----
} else {
assert(ii->is_Phi(), "sanity");
if (ii->as_Phi() == this) {
new_ii = new_phi;
} else {
! new_ii = new (phase->C, 2) EncodePNode(ii, in_decodeN->bottom_type());
! new_ii = new (phase->C, 2) EncodePNode(ii, narrow_t);
igvn->register_new_node_with_optimizer(new_ii);
}
}
new_phi->set_req(i, new_ii);
}
src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File