7044738: Loop unroll optimization causes incorrect result

Take into account memory dependencies when clonning nodes in clone_up_backedge_goo().

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2011-06-28 15:24:29 -07:00
parent 565f8579ac
commit b3505a88a4
7 changed files with 211 additions and 13 deletions

View file

@ -2012,6 +2012,16 @@ void Node_Stack::grow() {
_inode_top = _inodes + old_top; // restore _top
}
// Node_Stack is used to map nodes.
Node* Node_Stack::find(uint idx) const {
uint sz = size();
for (uint i=0; i < sz; i++) {
if (idx == index_at(i) )
return node_at(i);
}
return NULL;
}
//=============================================================================
uint TypeNode::size_of() const { return sizeof(*this); }
#ifndef PRODUCT