提交 7363a07e 编写于 作者: K kvn

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
上级 93403ca7
......@@ -1810,6 +1810,7 @@ void ConnectionGraph::process_call_result(ProjNode *resproj, PhaseTransform *pha
} 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_result(ProjNode *resproj, PhaseTransform *pha
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;
......@@ -1828,6 +1830,11 @@ void ConnectionGraph::process_call_result(ProjNode *resproj, PhaseTransform *pha
}
}
}
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 {
set_escape_state(call_idx, PointsToNode::GlobalEscape);
......@@ -2234,7 +2241,9 @@ void ConnectionGraph::build_connection_graph(Node *n, PhaseTransform *phase) {
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册