comparison src/share/vm/opto/graphKit.cpp @ 3849:f1c12354c3f7

7074017: Introduce MemBarAcquireLock/MemBarReleaseLock nodes for monitor enter/exit code paths Summary: replace MemBarAcquire/MemBarRelease nodes on the monitor enter/exit code paths with new MemBarAcquireLock/MemBarReleaseLock nodes Reviewed-by: kvn, twisti
author roland
date Tue, 02 Aug 2011 18:36:40 +0200
parents bad7ecd0b6ed
children 069ab3f976d3
comparison
equal deleted inserted replaced
3848:a19c671188cb 3849:f1c12354c3f7
2854 lock = _gvn.transform( lock )->as_Lock(); 2854 lock = _gvn.transform( lock )->as_Lock();
2855 2855
2856 // lock has no side-effects, sets few values 2856 // lock has no side-effects, sets few values
2857 set_predefined_output_for_runtime_call(lock, mem, TypeRawPtr::BOTTOM); 2857 set_predefined_output_for_runtime_call(lock, mem, TypeRawPtr::BOTTOM);
2858 2858
2859 insert_mem_bar(Op_MemBarAcquire); 2859 insert_mem_bar(Op_MemBarAcquireLock);
2860 2860
2861 // Add this to the worklist so that the lock can be eliminated 2861 // Add this to the worklist so that the lock can be eliminated
2862 record_for_igvn(lock); 2862 record_for_igvn(lock);
2863 2863
2864 #ifndef PRODUCT 2864 #ifndef PRODUCT
2887 map()->pop_monitor(); // Kill monitor from debug info 2887 map()->pop_monitor(); // Kill monitor from debug info
2888 return; 2888 return;
2889 } 2889 }
2890 2890
2891 // Memory barrier to avoid floating things down past the locked region 2891 // Memory barrier to avoid floating things down past the locked region
2892 insert_mem_bar(Op_MemBarRelease); 2892 insert_mem_bar(Op_MemBarReleaseLock);
2893 2893
2894 const TypeFunc *tf = OptoRuntime::complete_monitor_exit_Type(); 2894 const TypeFunc *tf = OptoRuntime::complete_monitor_exit_Type();
2895 UnlockNode *unlock = new (C, tf->domain()->cnt()) UnlockNode(C, tf); 2895 UnlockNode *unlock = new (C, tf->domain()->cnt()) UnlockNode(C, tf);
2896 uint raw_idx = Compile::AliasIdxRaw; 2896 uint raw_idx = Compile::AliasIdxRaw;
2897 unlock->init_req( TypeFunc::Control, control() ); 2897 unlock->init_req( TypeFunc::Control, control() );