[all-commits] [llvm/llvm-project] b0ffa8: [MSAN] Pass Origin by parameter to __msan_warning ...

Gui Andrade via All-commits all-commits at lists.llvm.org
Mon Jun 15 17:58:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b0ffa8befe4f631b058bb56d1f05c1977c5f6912
      https://github.com/llvm/llvm-project/commit/b0ffa8befe4f631b058bb56d1f05c1977c5f6912
  Author: Gui Andrade <guiand at google.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M compiler-rt/lib/msan/msan.cpp
    M compiler-rt/lib/msan/msan_interface_internal.h
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/atomics.ll
    M llvm/test/Instrumentation/MemorySanitizer/check-constant-shadow.ll
    M llvm/test/Instrumentation/MemorySanitizer/check_access_address.ll
    M llvm/test/Instrumentation/MemorySanitizer/csr.ll
    M llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_llvm_is_constant.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_llvm_launder_invariant.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_llvm_strip_invariant.ll
    M llvm/test/Instrumentation/MemorySanitizer/return_from_main.ll
    M llvm/test/Instrumentation/MemorySanitizer/vector_cvt.ll

  Log Message:
  -----------
  [MSAN] Pass Origin by parameter to __msan_warning functions

Summary:
Normally, the Origin is passed over TLS, which seems like it introduces unnecessary overhead. It's in the (extremely) cold path though, so the only overhead is in code size.

But with eager-checks, calls to __msan_warning functions are extremely common, so this becomes a useful optimization.

This can save ~5% code size.

Reviewers: eugenis, vitalybuka

Reviewed By: eugenis, vitalybuka

Subscribers: hiraditya, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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




More information about the All-commits mailing list