[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)
commitc5b974e6d2c441541b7d1ae60dc6cb60676e8b6e
tree0a71281b11950497b8e3c87d159cf782c0b89cb5
parent135f6abd48606dee3ff35114eefc2fa2c2681983
[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.

llvm-svn: 226569
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/test/Instrumentation/MemorySanitizer/check-constant-shadow.ll