Mercurial > hg > truffle
comparison src/share/vm/opto/escape.cpp @ 307:892493c3d862
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
author | kvn |
---|---|
date | Wed, 27 Aug 2008 16:33:34 -0700 |
parents | af945ba2e739 |
children | 424f9bfe6b96 |
comparison
equal
deleted
inserted
replaced
306:af945ba2e739 | 307:892493c3d862 |
---|---|
1808 add_pointsto_edge(resproj_idx, call_idx); | 1808 add_pointsto_edge(resproj_idx, call_idx); |
1809 copy_dependencies = true; | 1809 copy_dependencies = true; |
1810 } else if (call_analyzer->is_return_local()) { | 1810 } else if (call_analyzer->is_return_local()) { |
1811 // determine whether any arguments are returned | 1811 // determine whether any arguments are returned |
1812 set_escape_state(call_idx, PointsToNode::NoEscape); | 1812 set_escape_state(call_idx, PointsToNode::NoEscape); |
1813 bool ret_arg = false; | |
1813 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) { | 1814 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) { |
1814 const Type* at = d->field_at(i); | 1815 const Type* at = d->field_at(i); |
1815 | 1816 |
1816 if (at->isa_oopptr() != NULL) { | 1817 if (at->isa_oopptr() != NULL) { |
1817 Node *arg = call->in(i)->uncast(); | 1818 Node *arg = call->in(i)->uncast(); |
1818 | 1819 |
1819 if (call_analyzer->is_arg_returned(i - TypeFunc::Parms)) { | 1820 if (call_analyzer->is_arg_returned(i - TypeFunc::Parms)) { |
1821 ret_arg = true; | |
1820 PointsToNode *arg_esp = ptnode_adr(arg->_idx); | 1822 PointsToNode *arg_esp = ptnode_adr(arg->_idx); |
1821 if (arg_esp->node_type() == PointsToNode::UnknownType) | 1823 if (arg_esp->node_type() == PointsToNode::UnknownType) |
1822 done = false; | 1824 done = false; |
1823 else if (arg_esp->node_type() == PointsToNode::JavaObject) | 1825 else if (arg_esp->node_type() == PointsToNode::JavaObject) |
1824 add_pointsto_edge(resproj_idx, arg->_idx); | 1826 add_pointsto_edge(resproj_idx, arg->_idx); |
1825 else | 1827 else |
1826 add_deferred_edge(resproj_idx, arg->_idx); | 1828 add_deferred_edge(resproj_idx, arg->_idx); |
1827 arg_esp->_hidden_alias = true; | 1829 arg_esp->_hidden_alias = true; |
1828 } | 1830 } |
1829 } | 1831 } |
1832 } | |
1833 if (done && !ret_arg) { | |
1834 // Returns unknown object. | |
1835 set_escape_state(call_idx, PointsToNode::GlobalEscape); | |
1836 add_pointsto_edge(resproj_idx, _phantom_object); | |
1830 } | 1837 } |
1831 copy_dependencies = true; | 1838 copy_dependencies = true; |
1832 } else { | 1839 } else { |
1833 set_escape_state(call_idx, PointsToNode::GlobalEscape); | 1840 set_escape_state(call_idx, PointsToNode::GlobalEscape); |
1834 add_pointsto_edge(resproj_idx, _phantom_object); | 1841 add_pointsto_edge(resproj_idx, _phantom_object); |
2232 continue; // ignore NULL | 2239 continue; // ignore NULL |
2233 in = in->uncast(); | 2240 in = in->uncast(); |
2234 if (in->is_top() || in == n) | 2241 if (in->is_top() || in == n) |
2235 continue; // ignore top or inputs which go back this node | 2242 continue; // ignore top or inputs which go back this node |
2236 int ti = in->_idx; | 2243 int ti = in->_idx; |
2237 if (ptnode_adr(in->_idx)->node_type() == PointsToNode::JavaObject) { | 2244 PointsToNode::NodeType nt = ptnode_adr(ti)->node_type(); |
2245 assert(nt != PointsToNode::UnknownType, "all nodes should be known"); | |
2246 if (nt == PointsToNode::JavaObject) { | |
2238 add_pointsto_edge(n_idx, ti); | 2247 add_pointsto_edge(n_idx, ti); |
2239 } else { | 2248 } else { |
2240 add_deferred_edge(n_idx, ti); | 2249 add_deferred_edge(n_idx, ti); |
2241 } | 2250 } |
2242 } | 2251 } |