< prev index next >

src/share/vm/opto/castnode.cpp

Print this page

        

*** 33,43 **** #include "opto/type.hpp" //============================================================================= // If input is already higher or equal to cast type, then this is an identity. Node* ConstraintCastNode::Identity(PhaseGVN* phase) { ! Node* dom = dominating_cast(phase); if (dom != NULL) { return dom; } if (_carry_dependency) { return this; --- 33,43 ---- #include "opto/type.hpp" //============================================================================= // If input is already higher or equal to cast type, then this is an identity. Node* ConstraintCastNode::Identity(PhaseGVN* phase) { ! Node* dom = dominating_cast(phase, phase); if (dom != NULL) { return dom; } if (_carry_dependency) { return this;
*** 106,116 **** fatal("Bad opcode %d", opcode); } return NULL; } ! TypeNode* ConstraintCastNode::dominating_cast(PhaseTransform *phase) const { Node* val = in(1); Node* ctl = in(0); int opc = Opcode(); if (ctl == NULL) { return NULL; --- 106,116 ---- fatal("Bad opcode %d", opcode); } return NULL; } ! TypeNode* ConstraintCastNode::dominating_cast(PhaseGVN* gvn, PhaseTransform* pt) const { Node* val = in(1); Node* ctl = in(0); int opc = Opcode(); if (ctl == NULL) { return NULL;
*** 119,139 **** // in that case only the narrower CastII would be kept by the code // below which would be incorrect. if (is_CastII() && as_CastII()->has_range_check()) { return NULL; } ! if (type()->isa_rawptr() && (phase->type_or_null(val) == NULL || phase->type(val)->isa_oopptr())) { return NULL; } for (DUIterator_Fast imax, i = val->fast_outs(imax); i < imax; i++) { Node* u = val->fast_out(i); if (u != this && u->outcnt() > 0 && u->Opcode() == opc && u->in(0) != NULL && u->bottom_type()->higher_equal(type())) { ! if (phase->is_dominator(u->in(0), ctl)) { return u->as_Type(); } if (is_CheckCastPP() && u->in(1)->is_Proj() && u->in(1)->in(0)->is_Allocate() && u->in(0)->is_Proj() && u->in(0)->in(0)->is_Initialize() && u->in(1)->in(0)->as_Allocate()->initialization() == u->in(0)->in(0)) { --- 119,139 ---- // in that case only the narrower CastII would be kept by the code // below which would be incorrect. if (is_CastII() && as_CastII()->has_range_check()) { return NULL; } ! if (type()->isa_rawptr() && (gvn->type_or_null(val) == NULL || gvn->type(val)->isa_oopptr())) { return NULL; } for (DUIterator_Fast imax, i = val->fast_outs(imax); i < imax; i++) { Node* u = val->fast_out(i); if (u != this && u->outcnt() > 0 && u->Opcode() == opc && u->in(0) != NULL && u->bottom_type()->higher_equal(type())) { ! if (pt->is_dominator(u->in(0), ctl)) { return u->as_Type(); } if (is_CheckCastPP() && u->in(1)->is_Proj() && u->in(1)->in(0)->is_Allocate() && u->in(0)->is_Proj() && u->in(0)->in(0)->is_Initialize() && u->in(1)->in(0)->as_Allocate()->initialization() == u->in(0)->in(0)) {
*** 281,291 **** //============================================================================= //------------------------------Identity--------------------------------------- // If input is already higher or equal to cast type, then this is an identity. Node* CheckCastPPNode::Identity(PhaseGVN* phase) { ! Node* dom = dominating_cast(phase); if (dom != NULL) { return dom; } if (_carry_dependency) { return this; --- 281,291 ---- //============================================================================= //------------------------------Identity--------------------------------------- // If input is already higher or equal to cast type, then this is an identity. Node* CheckCastPPNode::Identity(PhaseGVN* phase) { ! Node* dom = dominating_cast(phase, phase); if (dom != NULL) { return dom; } if (_carry_dependency) { return this;
< prev index next >