Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/x86_32.ad Sat Jan 07 10:39:23 2012 -0800 +++ b/src/cpu/x86/vm/x86_32.ad Sat Jan 07 13:26:43 2012 -0800 @@ -13435,20 +13435,20 @@ // inlined locking and unlocking -instruct cmpFastLock( eFlagsReg cr, eRegP object, eRegP box, eAXRegI tmp, eRegP scr) %{ +instruct cmpFastLock( eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr) %{ match( Set cr (FastLock object box) ); - effect( TEMP tmp, TEMP scr ); + effect( TEMP tmp, TEMP scr, USE_KILL box ); ins_cost(300); - format %{ "FASTLOCK $object, $box KILLS $tmp,$scr" %} + format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %} ins_encode( Fast_Lock(object,box,tmp,scr) ); ins_pipe( pipe_slow ); %} instruct cmpFastUnlock( eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{ match( Set cr (FastUnlock object box) ); - effect( TEMP tmp ); + effect( TEMP tmp, USE_KILL box ); ins_cost(300); - format %{ "FASTUNLOCK $object, $box, $tmp" %} + format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %} ins_encode( Fast_Unlock(object,box,tmp) ); ins_pipe( pipe_slow ); %}