[all-commits] [llvm/llvm-project] 9b889f: Thread safety analysis: Warn when demoting locks o...
Aaron Puchert via All-commits
all-commits at lists.llvm.org
Sat Sep 18 05:02:51 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9b889f826ff587e9758c80823419512d502e457d
https://github.com/llvm/llvm-project/commit/9b889f826ff587e9758c80823419512d502e457d
Author: Aaron Puchert <aaron.puchert at sap.com>
Date: 2021-09-18 (Sat, 18 Sep 2021)
Changed paths:
M clang/lib/Analysis/ThreadSafety.cpp
M clang/test/SemaCXX/warn-thread-safety-analysis.cpp
Log Message:
-----------
Thread safety analysis: Warn when demoting locks on back edges
Previously in D104261 we warned about dropping locks from back edges,
this is the corresponding change for exclusive/shared joins. If we're
entering the loop with an exclusive change, which is then relaxed to a
shared lock before we loop back, we have already analyzed the loop body
with the stronger exclusive lock and thus might have false positives.
There is a minor non-observable change: we modify the exit lock set of a
function, but since that isn't used further it doesn't change anything.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D106713
More information about the All-commits
mailing list