src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6787050 Sdiff src/share/vm/opto

src/share/vm/opto/compile.cpp

Print this page




2175           //
2176         } else if (t->isa_oopptr()) {
2177           new_in2 = ConNode::make(C, t->make_narrowoop());
2178         }
2179       }
2180       if (new_in2 != NULL) {
2181         Node* cmpN = new (C, 3) CmpNNode(in1->in(1), new_in2);
2182         n->subsume_by( cmpN );
2183         if (in1->outcnt() == 0) {
2184           in1->disconnect_inputs(NULL);
2185         }
2186         if (in2->outcnt() == 0) {
2187           in2->disconnect_inputs(NULL);
2188         }
2189       }
2190     }
2191     break;
2192 
2193   case Op_DecodeN:
2194     assert(!n->in(1)->is_EncodeP(), "should be optimized out");
2195     assert(n->in(0) == NULL, "no control");


2196     break;
2197 
2198   case Op_EncodeP: {
2199     Node* in1 = n->in(1);
2200     if (in1->is_DecodeN()) {
2201       n->subsume_by(in1->in(1));
2202     } else if (in1->Opcode() == Op_ConP) {
2203       Compile* C = Compile::current();
2204       const Type* t = in1->bottom_type();
2205       if (t == TypePtr::NULL_PTR) {
2206         n->subsume_by(ConNode::make(C, TypeNarrowOop::NULL_PTR));
2207       } else if (t->isa_oopptr()) {
2208         n->subsume_by(ConNode::make(C, t->make_narrowoop()));
2209       }
2210     }
2211     if (in1->outcnt() == 0) {
2212       in1->disconnect_inputs(NULL);
2213     }
2214     break;
2215   }




2175           //
2176         } else if (t->isa_oopptr()) {
2177           new_in2 = ConNode::make(C, t->make_narrowoop());
2178         }
2179       }
2180       if (new_in2 != NULL) {
2181         Node* cmpN = new (C, 3) CmpNNode(in1->in(1), new_in2);
2182         n->subsume_by( cmpN );
2183         if (in1->outcnt() == 0) {
2184           in1->disconnect_inputs(NULL);
2185         }
2186         if (in2->outcnt() == 0) {
2187           in2->disconnect_inputs(NULL);
2188         }
2189       }
2190     }
2191     break;
2192 
2193   case Op_DecodeN:
2194     assert(!n->in(1)->is_EncodeP(), "should be optimized out");
2195     // DecodeN could be pinned on Sparc where it can't be fold into
2196     // an address expression, see the code for Op_CastPP above.
2197     assert(n->in(0) == NULL || !Matcher::clone_shift_expressions, "no control except on sparc");
2198     break;
2199 
2200   case Op_EncodeP: {
2201     Node* in1 = n->in(1);
2202     if (in1->is_DecodeN()) {
2203       n->subsume_by(in1->in(1));
2204     } else if (in1->Opcode() == Op_ConP) {
2205       Compile* C = Compile::current();
2206       const Type* t = in1->bottom_type();
2207       if (t == TypePtr::NULL_PTR) {
2208         n->subsume_by(ConNode::make(C, TypeNarrowOop::NULL_PTR));
2209       } else if (t->isa_oopptr()) {
2210         n->subsume_by(ConNode::make(C, t->make_narrowoop()));
2211       }
2212     }
2213     if (in1->outcnt() == 0) {
2214       in1->disconnect_inputs(NULL);
2215     }
2216     break;
2217   }


src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File