CLion says phi_reg and phi_len are unused after the block below:
// Look carefully at the base node if it is a phi.
PhiNode* phi_base;
if (new_base != NULL && new_base->is_Phi())
phi_base = new_base->as_Phi();
else
phi_base = NULL;
Node* phi_reg = NULL;
uint phi_len = (uint)-1;
if (phi_base != NULL && !phi_base->is_copy()) {
// do not examine phi if degraded to a copy
phi_reg = phi_base->region();
phi_len = phi_base->req();
// see if the phi is unfinished
for (uint i = 1; i < phi_len; i++) {
if (phi_base->in(i) == NULL) {
// incomplete phi; do not look at it yet!
phi_reg = NULL;
phi_len = (uint)-1;
break;
}
}
}
It seems the entire thing, including phi_base is unused. The only reason I could find is reaching for asserts in is_copy(), region(), etc. In that case, the block can be wrapped in ASSERT to avoid useless walk in production code. If this block is not even for asserts, we can prune it.
This and surrounding code seems to be the same since the initial load.
// Look carefully at the base node if it is a phi.
PhiNode* phi_base;
if (new_base != NULL && new_base->is_Phi())
phi_base = new_base->as_Phi();
else
phi_base = NULL;
Node* phi_reg = NULL;
uint phi_len = (uint)-1;
if (phi_base != NULL && !phi_base->is_copy()) {
// do not examine phi if degraded to a copy
phi_reg = phi_base->region();
phi_len = phi_base->req();
// see if the phi is unfinished
for (uint i = 1; i < phi_len; i++) {
if (phi_base->in(i) == NULL) {
// incomplete phi; do not look at it yet!
phi_reg = NULL;
phi_len = (uint)-1;
break;
}
}
}
It seems the entire thing, including phi_base is unused. The only reason I could find is reaching for asserts in is_copy(), region(), etc. In that case, the block can be wrapped in ASSERT to avoid useless walk in production code. If this block is not even for asserts, we can prune it.
This and surrounding code seems to be the same since the initial load.
- relates to
-
JDK-8243670 Unexpected test result caused by C2 MergeMemNode::Ideal
-
- Closed
-