src/share/vm/opto/callnode.cpp

changeset 3651
ee138854b3a6
parent 3419
b0ff910edfc9
child 3969
1d7922586cf6
equal deleted inserted replaced
3636:fde683df4c27 3651:ee138854b3a6
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
1536 if (can_reshape && EliminateLocks && !is_non_esc_obj()) { 1536 if (can_reshape && EliminateLocks && !is_non_esc_obj()) {
1537 // 1537 //
1538 // If we are locking an unescaped object, the lock/unlock is unnecessary 1538 // If we are locking an unescaped object, the lock/unlock is unnecessary
1539 // 1539 //
1540 ConnectionGraph *cgr = phase->C->congraph(); 1540 ConnectionGraph *cgr = phase->C->congraph();
1541 PointsToNode::EscapeState es = PointsToNode::GlobalEscape; 1541 if (cgr != NULL && cgr->not_global_escape(obj_node())) {
1542 if (cgr != NULL)
1543 es = cgr->escape_state(obj_node());
1544 if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
1545 assert(!is_eliminated() || is_coarsened(), "sanity"); 1542 assert(!is_eliminated() || is_coarsened(), "sanity");
1546 // The lock could be marked eliminated by lock coarsening 1543 // The lock could be marked eliminated by lock coarsening
1547 // code during first IGVN before EA. Replace coarsened flag 1544 // code during first IGVN before EA. Replace coarsened flag
1548 // to eliminate all associated locks/unlocks. 1545 // to eliminate all associated locks/unlocks.
1549 this->set_non_esc_obj(); 1546 this->set_non_esc_obj();
1678 if (can_reshape && EliminateLocks && !is_non_esc_obj()) { 1675 if (can_reshape && EliminateLocks && !is_non_esc_obj()) {
1679 // 1676 //
1680 // If we are unlocking an unescaped object, the lock/unlock is unnecessary. 1677 // If we are unlocking an unescaped object, the lock/unlock is unnecessary.
1681 // 1678 //
1682 ConnectionGraph *cgr = phase->C->congraph(); 1679 ConnectionGraph *cgr = phase->C->congraph();
1683 PointsToNode::EscapeState es = PointsToNode::GlobalEscape; 1680 if (cgr != NULL && cgr->not_global_escape(obj_node())) {
1684 if (cgr != NULL)
1685 es = cgr->escape_state(obj_node());
1686 if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
1687 assert(!is_eliminated() || is_coarsened(), "sanity"); 1681 assert(!is_eliminated() || is_coarsened(), "sanity");
1688 // The lock could be marked eliminated by lock coarsening 1682 // The lock could be marked eliminated by lock coarsening
1689 // code during first IGVN before EA. Replace coarsened flag 1683 // code during first IGVN before EA. Replace coarsened flag
1690 // to eliminate all associated locks/unlocks. 1684 // to eliminate all associated locks/unlocks.
1691 this->set_non_esc_obj(); 1685 this->set_non_esc_obj();

mercurial