diff options
author | Amir Ayupov <aaupov@fb.com> | 2022-04-13 21:09:25 +0300 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2022-04-13 21:10:36 +0300 |
commit | bad3798113f8760a7978d745d428a1271e75554c (patch) | |
tree | b7bbab7cbd3bda85a1b52805de922174f080ed26 /bolt | |
parent | 38823b7f5f01e01c44360b17b4ab99b2729b7197 (diff) |
[BOLT] Fix data race in shortenInstructions
Address ThreadSanitizer warning
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D121338
Diffstat (limited to 'bolt')
-rw-r--r-- | bolt/lib/Passes/BinaryPasses.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bolt/lib/Passes/BinaryPasses.cpp b/bolt/lib/Passes/BinaryPasses.cpp index a5cd1ff84766..125ae3246d60 100644 --- a/bolt/lib/Passes/BinaryPasses.cpp +++ b/bolt/lib/Passes/BinaryPasses.cpp @@ -1015,6 +1015,7 @@ uint64_t ShortenInstructions::shortenInstructions(BinaryFunction &Function) { continue; if (opts::Verbosity > 2) { + BC.scopeLock(); outs() << "BOLT-INFO: shortening:\nBOLT-INFO: "; BC.printInstruction(outs(), OriginalInst, 0, &Function); outs() << "BOLT-INFO: to:"; |