aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-08-02 11:04:43 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-08-03 11:03:23 +0200
commit831910c5c4941b7c58d4d50d9e20808c8e2c1c0b (patch)
tree11a3b7dd20118623cf938becf987f6883c0ec31c /llvm/lib/Object/XCOFFObjectFile.cpp
parent0156f91f3b0af0c2b3c14eecb6192dbb039fc2d2 (diff)
downloadllvm-831910c5c4941b7c58d4d50d9e20808c8e2c1c0b.zip
llvm-831910c5c4941b7c58d4d50d9e20808c8e2c1c0b.tar.gz
llvm-831910c5c4941b7c58d4d50d9e20808c8e2c1c0b.tar.bz2
tsan: new MemoryAccess interface
Currently we have MemoryAccess function that accepts "bool kAccessIsWrite, bool kIsAtomic" and 4 wrappers: MemoryRead/MemoryWrite/MemoryReadAtomic/MemoryWriteAtomic. Such scheme with bool flags is not particularly scalable/extendable. Because of that we did not have Read/Write wrappers for UnalignedMemoryAccess, and "true, false" or "false, true" at call sites is not very readable. Moreover, the new tsan runtime will introduce more flags (e.g. move "freed" and "vptr access" to memory acccess flags). We can't have 16 wrappers and each flag also takes whole 64-bit register for non-inlined calls. Introduce AccessType enum that contains bit mask of read/write, atomic/non-atomic, and later free/non-free, vptr/non-vptr. Such scheme is more scalable, more readble, more efficient (don't consume multiple registers for these flags during calls) and allows to cover unaligned and range variations of memory access functions as well. Also switch from size log to just size. The new tsan runtime won't have the limitation of supporting only 1/2/4/8 access sizes, so we don't need the logarithms. Also add an inline thunk that converts the new interface to the old one. For inlined calls it should not add any overhead because all flags/size can be computed as compile time. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D107276
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions