[PATCH] D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load

Gui Andrade via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 11:02:24 PDT 2020


guiand updated this revision to Diff 277491.
guiand added a comment.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

I've expanded this to be able to find chained uses like through a bitcast.

Mostly a proof-of-concept; this still needs a check to make sure the final store is over the whole size of the initial type. And, of course, the main issue is that this really slows down compilation. So I think using MemSSA might be necessary for performance reasons, unless there's some algorithm tweak I can make here that would reduce the complexity.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83595/new/

https://reviews.llvm.org/D83595

Files:
  compiler-rt/test/msan/Linux/fopencookie.cpp
  compiler-rt/test/msan/getaddrinfo.cpp
  compiler-rt/test/msan/qsort.cpp
  compiler-rt/test/msan/vararg.cpp
  llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
  llvm/test/Instrumentation/MemorySanitizer/alloca-store.ll
  llvm/test/Instrumentation/MemorySanitizer/alloca.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83595.277491.patch
Type: text/x-patch
Size: 8538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/dfa51a3a/attachment.bin>


More information about the llvm-commits mailing list