Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/x86_32.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 |
---|---|
13433 %} | 13433 %} |
13434 | 13434 |
13435 // inlined locking and unlocking | 13435 // inlined locking and unlocking |
13436 | 13436 |
13437 | 13437 |
13438 instruct cmpFastLock( eFlagsReg cr, eRegP object, eRegP box, eAXRegI tmp, eRegP scr) %{ | 13438 instruct cmpFastLock( eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr) %{ |
13439 match( Set cr (FastLock object box) ); | 13439 match( Set cr (FastLock object box) ); |
13440 effect( TEMP tmp, TEMP scr ); | 13440 effect( TEMP tmp, TEMP scr, USE_KILL box ); |
13441 ins_cost(300); | 13441 ins_cost(300); |
13442 format %{ "FASTLOCK $object, $box KILLS $tmp,$scr" %} | 13442 format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %} |
13443 ins_encode( Fast_Lock(object,box,tmp,scr) ); | 13443 ins_encode( Fast_Lock(object,box,tmp,scr) ); |
13444 ins_pipe( pipe_slow ); | 13444 ins_pipe( pipe_slow ); |
13445 %} | 13445 %} |
13446 | 13446 |
13447 instruct cmpFastUnlock( eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{ | 13447 instruct cmpFastUnlock( eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{ |
13448 match( Set cr (FastUnlock object box) ); | 13448 match( Set cr (FastUnlock object box) ); |
13449 effect( TEMP tmp ); | 13449 effect( TEMP tmp, USE_KILL box ); |
13450 ins_cost(300); | 13450 ins_cost(300); |
13451 format %{ "FASTUNLOCK $object, $box, $tmp" %} | 13451 format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %} |
13452 ins_encode( Fast_Unlock(object,box,tmp) ); | 13452 ins_encode( Fast_Unlock(object,box,tmp) ); |
13453 ins_pipe( pipe_slow ); | 13453 ins_pipe( pipe_slow ); |
13454 %} | 13454 %} |
13455 | 13455 |
13456 | 13456 |