[PATCH] D81700: [MSAN] Under eager-checks, pass Origin by parameter to __msan_warning functions

Gui Andrade via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 17:07:34 PDT 2020


guiand created this revision.
guiand added a reviewer: eugenis.
Herald added subscribers: llvm-commits, Sanitizers, hiraditya.
Herald added projects: Sanitizers, LLVM.
guiand added a parent revision: D81699: MemorySanitizer: Add option to insert init checks at call site.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81700

Files:
  compiler-rt/lib/msan/msan.cpp
  compiler-rt/lib/msan/msan_interface_internal.h
  llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81700.270264.patch
Type: text/x-patch
Size: 3896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200612/706f3d53/attachment.bin>


More information about the llvm-commits mailing list