projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d16bbc5
)
[BOLT][NFC] Fix print-cfg data race
author
Amir Ayupov
<aaupov@fb.com>
Thu, 10 Mar 2022 04:27:15 +0000
(20:27 -0800)
committer
Amir Ayupov
<aaupov@fb.com>
Thu, 10 Mar 2022 04:28:06 +0000
(20:28 -0800)
Addresses ThreadSanitizer warning
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D121337
bolt/lib/Rewrite/RewriteInstance.cpp
patch
|
blob
|
history
diff --git
a/bolt/lib/Rewrite/RewriteInstance.cpp
b/bolt/lib/Rewrite/RewriteInstance.cpp
index
ea2cee1
..
b814862
100644
(file)
--- a/
bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/
bolt/lib/Rewrite/RewriteInstance.cpp
@@
-2950,8
+2950,10
@@
void RewriteInstance::buildFunctionsCFG() {
if (!BF.buildCFG(AllocId))
return;
- if (opts::PrintAll)
+ if (opts::PrintAll) {
+ auto L = BC->scopeLock();
BF.print(outs(), "while building cfg", true);
+ }
};
ParallelUtilities::PredicateTy SkipPredicate = [&](const BinaryFunction &BF) {