[all-commits] [llvm/llvm-project] cbe1e6: [Instruction] Introduce getAtomicSyncScopeID()
Marco Elver via All-commits
all-commits at lists.llvm.org
Thu Mar 17 07:23:55 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cbe1e67eade900fa73f29b88ab49fcb6fc29bbb0
https://github.com/llvm/llvm-project/commit/cbe1e67eade900fa73f29b88ab49fcb6fc29bbb0
Author: Marco Elver <elver at google.com>
Date: 2022-03-17 (Thu, 17 Mar 2022)
Changed paths:
M llvm/include/llvm/IR/Instructions.h
M llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
Log Message:
-----------
[Instruction] Introduce getAtomicSyncScopeID()
An analysis may just be interested in checking if an instruction is
atomic but system scoped or single-thread scoped, like ThreadSanitizer's
isAtomic(). Unfortunately Instruction::isAtomic() can only answer the
"atomic" part of the question, but to also check scope becomes rather
verbose.
To simplify and reduce redundancy, introduce a common helper
getAtomicSyncScopeID() which returns the scope of an atomic operation.
Start using it in ThreadSanitizer.
NFCI.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D121910
More information about the All-commits
mailing list