[all-commits] [llvm/llvm-project] c0b500: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_t...

Gui Andrade via All-commits all-commits at lists.llvm.org
Mon Aug 10 12:23:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c0b5000bd848303320c03f80fbf84d71e74518c9
      https://github.com/llvm/llvm-project/commit/c0b5000bd848303320c03f80fbf84d71e74518c9
  Author: Gui Andrade <guiand at google.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M compiler-rt/lib/msan/msan.cpp

  Log Message:
  -----------
  [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow

The former function is particularly optimized for exactly the
use case we're interested in: an all-zero buffer.

This reduces the overhead of calling this function some 80% or
more. This is particularly for instrumenting code heavy with
string processing functions, like grep. An invocation of grep
with the pattern '[aeiou]k[aeiou]' has its runtime reduced by
~75% with this patch

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




More information about the All-commits mailing list