6732732: CTW with EA: assert(n != 0L,"Bad immediate dominator info.")
authorkvn
Wed Aug 27 16:33:34 2008 -0700 (15 months ago)
changeset 307892493c3d862
parent 306af945ba2e739
child 308756b58154237
6732732: CTW with EA: assert(n != 0L,"Bad immediate dominator info.")
Summary: Missing edge to a call's return value in EA Connection Graph.
Reviewed-by: never
src/share/vm/opto/escape.cpp
--- a/src/share/vm/opto/escape.cpp Wed Aug 27 14:47:32 2008 -0700
+++ b/src/share/vm/opto/escape.cpp Wed Aug 27 16:33:34 2008 -0700
@@ -1810,6 +1810,7 @@ void ConnectionGraph::process_call_resul
} else if (call_analyzer->is_return_local()) {
// determine whether any arguments are returned
set_escape_state(call_idx, PointsToNode::NoEscape);
+ bool ret_arg = false;
for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
const Type* at = d->field_at(i);
@@ -1817,6 +1818,7 @@ void ConnectionGraph::process_call_resul
Node *arg = call->in(i)->uncast();
if (call_analyzer->is_arg_returned(i - TypeFunc::Parms)) {
+ ret_arg = true;
PointsToNode *arg_esp = ptnode_adr(arg->_idx);
if (arg_esp->node_type() == PointsToNode::UnknownType)
done = false;
@@ -1827,6 +1829,11 @@ void ConnectionGraph::process_call_resul
arg_esp->_hidden_alias = true;
}
}
+ }
+ if (done && !ret_arg) {
+ // Returns unknown object.
+ set_escape_state(call_idx, PointsToNode::GlobalEscape);
+ add_pointsto_edge(resproj_idx, _phantom_object);
}
copy_dependencies = true;
} else {
@@ -2234,7 +2241,9 @@ void ConnectionGraph::build_connection_g
if (in->is_top() || in == n)
continue; // ignore top or inputs which go back this node
int ti = in->_idx;
- if (ptnode_adr(in->_idx)->node_type() == PointsToNode::JavaObject) {
+ PointsToNode::NodeType nt = ptnode_adr(ti)->node_type();
+ assert(nt != PointsToNode::UnknownType, "all nodes should be known");
+ if (nt == PointsToNode::JavaObject) {
add_pointsto_edge(n_idx, ti);
} else {
add_deferred_edge(n_idx, ti);