Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciTypeFlow.cpp @ 4777:e9a5e0a812c8
7125896: Eliminate nested locks
Summary: Nested locks elimination done before lock nodes expansion by looking for outer locks of the same object.
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Sat, 07 Jan 2012 13:26:43 -0800 |
parents | 322a41ec766c |
children | 1d7922586cf6 |
comparison
equal
deleted
inserted
replaced
4776:5da7201222d5 | 4777:e9a5e0a812c8 |
---|---|
1587 jsrs->copy_into(new_jsrs); | 1587 jsrs->copy_into(new_jsrs); |
1588 _jsrs = new_jsrs; | 1588 _jsrs = new_jsrs; |
1589 _next = NULL; | 1589 _next = NULL; |
1590 _on_work_list = false; | 1590 _on_work_list = false; |
1591 _backedge_copy = false; | 1591 _backedge_copy = false; |
1592 _exception_entry = false; | 1592 _has_monitorenter = false; |
1593 _trap_bci = -1; | 1593 _trap_bci = -1; |
1594 _trap_index = 0; | 1594 _trap_index = 0; |
1595 df_init(); | 1595 df_init(); |
1596 | 1596 |
1597 if (CITraceTypeFlow) { | 1597 if (CITraceTypeFlow) { |
2180 if (lp == loop_tree_root() || | 2180 if (lp == loop_tree_root() || |
2181 lp->is_irreducible() || | 2181 lp->is_irreducible() || |
2182 !head->is_clonable_exit(lp)) | 2182 !head->is_clonable_exit(lp)) |
2183 continue; | 2183 continue; |
2184 | 2184 |
2185 // Avoid BoxLock merge. | |
2186 if (EliminateNestedLocks && head->has_monitorenter()) | |
2187 continue; | |
2188 | |
2185 // check not already cloned | 2189 // check not already cloned |
2186 if (head->backedge_copy_count() != 0) | 2190 if (head->backedge_copy_count() != 0) |
2187 continue; | 2191 continue; |
2188 | 2192 |
2189 // check _no_ shared head below us | 2193 // check _no_ shared head below us |
2319 // Apply the effects of the current bytecode to our state. | 2323 // Apply the effects of the current bytecode to our state. |
2320 bool res = state->apply_one_bytecode(&str); | 2324 bool res = state->apply_one_bytecode(&str); |
2321 | 2325 |
2322 // Watch for bailouts. | 2326 // Watch for bailouts. |
2323 if (failing()) return; | 2327 if (failing()) return; |
2328 | |
2329 if (str.cur_bc() == Bytecodes::_monitorenter) { | |
2330 block->set_has_monitorenter(); | |
2331 } | |
2324 | 2332 |
2325 if (res) { | 2333 if (res) { |
2326 | 2334 |
2327 // We have encountered a trap. Record it in this block. | 2335 // We have encountered a trap. Record it in this block. |
2328 block->set_trap(state->trap_bci(), state->trap_index()); | 2336 block->set_trap(state->trap_bci(), state->trap_index()); |