Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/x86_64.ad @ 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 | 1dc233a8c7fe |
children | fd8114661503 |
comparison
equal
deleted
inserted
replaced
4776:5da7201222d5 | 4777:e9a5e0a812c8 |
---|---|
11509 | 11509 |
11510 // ============================================================================ | 11510 // ============================================================================ |
11511 // inlined locking and unlocking | 11511 // inlined locking and unlocking |
11512 | 11512 |
11513 instruct cmpFastLock(rFlagsReg cr, | 11513 instruct cmpFastLock(rFlagsReg cr, |
11514 rRegP object, rRegP box, rax_RegI tmp, rRegP scr) | 11514 rRegP object, rbx_RegP box, rax_RegI tmp, rRegP scr) |
11515 %{ | 11515 %{ |
11516 match(Set cr (FastLock object box)); | 11516 match(Set cr (FastLock object box)); |
11517 effect(TEMP tmp, TEMP scr); | 11517 effect(TEMP tmp, TEMP scr, USE_KILL box); |
11518 | 11518 |
11519 ins_cost(300); | 11519 ins_cost(300); |
11520 format %{ "fastlock $object,$box,$tmp,$scr" %} | 11520 format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %} |
11521 ins_encode(Fast_Lock(object, box, tmp, scr)); | 11521 ins_encode(Fast_Lock(object, box, tmp, scr)); |
11522 ins_pipe(pipe_slow); | 11522 ins_pipe(pipe_slow); |
11523 %} | 11523 %} |
11524 | 11524 |
11525 instruct cmpFastUnlock(rFlagsReg cr, | 11525 instruct cmpFastUnlock(rFlagsReg cr, |
11526 rRegP object, rax_RegP box, rRegP tmp) | 11526 rRegP object, rax_RegP box, rRegP tmp) |
11527 %{ | 11527 %{ |
11528 match(Set cr (FastUnlock object box)); | 11528 match(Set cr (FastUnlock object box)); |
11529 effect(TEMP tmp); | 11529 effect(TEMP tmp, USE_KILL box); |
11530 | 11530 |
11531 ins_cost(300); | 11531 ins_cost(300); |
11532 format %{ "fastunlock $object, $box, $tmp" %} | 11532 format %{ "fastunlock $object,$box\t! kills $box,$tmp" %} |
11533 ins_encode(Fast_Unlock(object, box, tmp)); | 11533 ins_encode(Fast_Unlock(object, box, tmp)); |
11534 ins_pipe(pipe_slow); | 11534 ins_pipe(pipe_slow); |
11535 %} | 11535 %} |
11536 | 11536 |
11537 | 11537 |