[all-commits] [llvm/llvm-project] 3ccb77: [compiler-rt] Mark some performance critical buffe...

Marco Elver via All-commits all-commits at lists.llvm.org
Tue May 30 03:02:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ccb7702425a965836ca69fe75184698a59ee8f9
      https://github.com/llvm/llvm-project/commit/3ccb7702425a965836ca69fe75184698a59ee8f9
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M compiler-rt/lib/asan/asan_stack.h
    M compiler-rt/lib/msan/msan.h
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h
    M compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h

  Log Message:
  -----------
  [compiler-rt] Mark some performance critical buffers uninitialized

With -ftrivial-auto-var-init, do not emit memset() calls for performance
critical stack variables.

Reviewed By: vitalybuka, dvyukov, MaskRay

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


  Commit: c551c9c311b33a847390f6a57afda3b82d517675
      https://github.com/llvm/llvm-project/commit/c551c9c311b33a847390f6a57afda3b82d517675
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M compiler-rt/lib/asan/asan_interceptors.cpp
    M compiler-rt/lib/asan/asan_interceptors.h
    M compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp
    M compiler-rt/lib/asan/asan_interceptors_memintrinsics.h
    M compiler-rt/lib/hwasan/hwasan_interceptors.cpp
    M compiler-rt/lib/memprof/memprof_interceptors.cpp
    M compiler-rt/lib/memprof/memprof_interceptors.h
    M compiler-rt/lib/memprof/memprof_interceptors_memintrinsics.cpp
    M compiler-rt/lib/memprof/memprof_interceptors_memintrinsics.h
    M compiler-rt/lib/msan/msan_interceptors.cpp
    M compiler-rt/lib/sanitizer_common/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
    A compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc
    M compiler-rt/lib/tsan/rtl/CMakeLists.txt
    M compiler-rt/lib/tsan/rtl/tsan_interceptors.h
    A compiler-rt/lib/tsan/rtl/tsan_interceptors_memintrinsics.cpp
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    M compiler-rt/lib/tsan/rtl/tsan_report.cpp
    M llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn

  Log Message:
  -----------
  [compiler-rt] Refactor memintrinsic interceptors

This moves memintrinsic interceptors (memcpy/memmove/memset) into a new
file sanitizer_common_interceptors_memintrinsics.inc.

This is in preparation of redefining builtins, however, we must be
careful to not redefine builtins in TUs that define interceptors of the
same name.

In all cases except for MSan, memintrinsic interceptors were moved to a
new TU $tool_interceptors_memintrinsics.cpp. In the case of MSan, it
turns out this is not yet necessary (as shown by the later patch
introducing memcpy tests).

NFC.

Reviewed By: vitalybuka

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


Compare: https://github.com/llvm/llvm-project/compare/c644341c2cb7...c551c9c311b3


More information about the All-commits mailing list