This is an archive of the discontinued LLVM Phabricator instance.

tsan: add LIKELY/UNLIKELY to MetaMap::GetSync
ClosedPublic

Authored by dvyukov on Aug 2 2021, 2:09 AM.

Details

Summary

MetaMap::GetSync shows up in profiles,
so add LIKELY/UNLIKELY annotations.

Depends on D107256.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Aug 2 2021, 2:09 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2021, 2:09 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Aug 2 2021, 3:41 AM
melver added inline comments.
compiler-rt/lib/tsan/rtl/tsan_sync.cpp
198–199

Would restricting scope of idx and moving condition into loop-condition be more readable?

for (u32 idx = idx0; LIKELY((idx != 0) && !(idx & kFlagBlock));) {
This revision is now accepted and ready to land.Aug 2 2021, 3:41 AM
This revision was automatically updated to reflect the committed changes.