src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/cfgnode.cpp
src/share/vm/opto/cfgnode.cpp
Print this page
rev 10020 : raw ptr fix
*** 1169,1181 ****
// Find the unique value, discounting top, self-loops, and casts.
// Return top if there are no inputs, and self if there are multiple.
Node* PhiNode::unique_input(PhaseTransform* phase, bool uncast) {
// 1) One unique direct input,
// or if uncast is true:
! // 2) some of the inputs have an intervening ConstraintCast and
! // the type of input is the same or sharper (more specific)
! // than the phi's type.
// 3) an input is a self loop
//
// 1) input or 2) input or 3) input __
// / \ / \ \ / \
// \ / | cast phi cast
--- 1169,1179 ----
// Find the unique value, discounting top, self-loops, and casts.
// Return top if there are no inputs, and self if there are multiple.
Node* PhiNode::unique_input(PhaseTransform* phase, bool uncast) {
// 1) One unique direct input,
// or if uncast is true:
! // 2) some of the inputs have an intervening ConstraintCast
// 3) an input is a self loop
//
// 1) input or 2) input or 3) input __
// / \ / \ \ / \
// \ / | cast phi cast
*** 1191,1201 ****
if (rc == NULL || phase->type(rc) == Type::TOP)
continue; // ignore unreachable control path
Node* n = in(i);
if (n == NULL)
continue;
! Node* un = uncast ? n->uncast() : n;
if (un == NULL || un == this || phase->type(un) == Type::TOP) {
continue; // ignore if top, or in(i) and "this" are in a data cycle
}
// Check for a unique input (maybe uncasted)
if (input == NULL) {
--- 1189,1213 ----
if (rc == NULL || phase->type(rc) == Type::TOP)
continue; // ignore unreachable control path
Node* n = in(i);
if (n == NULL)
continue;
! Node* un = n;
! if (uncast) {
! #ifdef ASSERT
! Node* m = un->uncast();
! #endif
! while (un != NULL && un->req() == 2 && un->is_ConstraintCast()) {
! Node* next = un->in(1);
! if (phase->type(next)->isa_rawptr() && phase->type(un)->isa_oopptr()) {
! // risk exposing raw ptr at safepoint
! break;
! }
! un = next;
! }
! assert(m == un || un->in(1) == m, "Only expected at CheckCastPP from allocation");
! }
if (un == NULL || un == this || phase->type(un) == Type::TOP) {
continue; // ignore if top, or in(i) and "this" are in a data cycle
}
// Check for a unique input (maybe uncasted)
if (input == NULL) {
src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File