src/share/vm/opto/lcm.cpp

changeset 9912
97d09139b360
parent 9475
61523d110335
child 9931
fd44df5e3bc3
child 9953
8a8f679915aa
equal deleted inserted replaced
9911:6f33e450999c 9912:97d09139b360
1 /* 1 /*
2 * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
813 // and then removes the last edge. If the specified edge > number of 813 // and then removes the last edge. If the specified edge > number of
814 // edges the last edge will be moved outside of the input edges array 814 // edges the last edge will be moved outside of the input edges array
815 // and the edge will be lost. This is why this code should be 815 // and the edge will be lost. This is why this code should be
816 // executed only when Precedent (== TypeFunc::Parms) edge is present. 816 // executed only when Precedent (== TypeFunc::Parms) edge is present.
817 Node *x = n->in(TypeFunc::Parms); 817 Node *x = n->in(TypeFunc::Parms);
818 if (x != NULL && get_block_for_node(x) == block && n->find_prec_edge(x) != -1) {
819 // Old edge to node within same block will get removed, but no precedence
820 // edge will get added because it already exists. Update ready count.
821 int cnt = ready_cnt.at(n->_idx);
822 assert(cnt > 1, err_msg("MemBar node %d must not get ready here", n->_idx));
823 ready_cnt.at_put(n->_idx, cnt-1);
824 }
818 n->del_req(TypeFunc::Parms); 825 n->del_req(TypeFunc::Parms);
819 n->add_prec(x); 826 n->add_prec(x);
820 } 827 }
821 } 828 }
822 } 829 }

mercurial