[msan] Optimize -msan-check-constant-shadow.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 20 Jan 2015 15:21:35 +0000 (15:21 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 20 Jan 2015 15:21:35 +0000 (15:21 +0000)
commitd9434ef62ffbc1ba4c16437b899f7ceeb63dfa03
tree1bea1ac504c492343fd5233c0f90d1f2389f38c4
parent68d992759ae9f33bdcb907b311e6079059db30aa
[msan] Optimize -msan-check-constant-shadow.

The new code does not create new basic blocks in the case when shadow is a
compile-time constant; it generates either an unconditional __msan_warning
call or nothing instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226569 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/MemorySanitizer.cpp
test/Instrumentation/MemorySanitizer/check-constant-shadow.ll