[all-commits] [llvm/llvm-project] d77b47: tsan: avoid extra call indirection in unaligned ac...

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Tue Aug 3 02:13:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967
      https://github.com/llvm/llvm-project/commit/d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interface.cpp
    M compiler-rt/lib/tsan/rtl/tsan_interface_inl.h

  Log Message:
  -----------
  tsan: avoid extra call indirection in unaligned access functions

Currently unaligned access functions are defined in tsan_interface.cpp
and do a real call to MemoryAccess. This means we have a real call
and no read/write constant propagation.

Unaligned memory access can be quite hot for some programs
(observed on some compression algorithms with ~90% of unaligned accesses).

Move them to tsan_interface_inl.h to avoid the additional call
and enable constant propagation.
Also reorder the actual store and memory access handling for
__sanitizer_unaligned_store callbacks to enable tail calling
in MemoryAccess.

Depends on D107282.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107283




More information about the All-commits mailing list