diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-07-30 17:13:21 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-07-30 17:13:21 +0000 |
commit | 088e37c77aafaec5ead8fbe7ebf918265e6b86f2 (patch) | |
tree | 20c95d7e75e78dc0efa5826ff856bcd4f76318e7 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | ebcd1c7ca2e21192dee17985221c7c0efb017506 (diff) | |
download | llvm-088e37c77aafaec5ead8fbe7ebf918265e6b86f2.zip llvm-088e37c77aafaec5ead8fbe7ebf918265e6b86f2.tar.gz llvm-088e37c77aafaec5ead8fbe7ebf918265e6b86f2.tar.bz2 |
Despite my pathological distrust of spin locks, the number just don't lie. I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.
llvm-svn: 160967
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions