This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Fix data race in ShrinkWrapping stats
ClosedPublic

Authored by Amir on Feb 20 2022, 12:29 PM.

Details

Summary

Fix data race reported by ThreadSanitizer in clang.test:

ThreadSanitizer: data race /data/llvm-project/bolt/lib/Passes/ShrinkWrapping.cpp:1359:28
in llvm::bolt::ShrinkWrapping::moveSaveRestores()

The issue is with incrementing global counters from multiple threads.

Diff Detail

Event Timeline

Amir created this revision.Feb 20 2022, 12:29 PM
Amir requested review of this revision.Feb 20 2022, 12:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2022, 12:29 PM
yota9 accepted this revision.Feb 20 2022, 12:48 PM
This revision is now accepted and ready to land.Feb 20 2022, 12:48 PM
This revision was automatically updated to reflect the committed changes.