msan: Handle musttail calls
authorReid Kleckner <reid@kleckner.net>
Tue, 12 Aug 2014 00:12:43 +0000 (00:12 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 12 Aug 2014 00:12:43 +0000 (00:12 +0000)
commit23761603fe609770cc6fd3e42edf96b273265b7d
tree5015e6e1226350a52eaf96830c7dc250910067b5
parent2970677f21ef006e6c8477e0c3f58fdd28b2ac03
msan: Handle musttail calls

First, avoid calling setTailCall(false) on musttail calls.  The funciton
prototypes should be "congruent", so the shadow layout should be exactly
the same.

Second, avoid inserting instrumentation after a musttail call to
propagate the return value shadow.  We don't need to propagate the
result of a tail call, it should already be in the right place.

Reviewed By: eugenis

Differential Revision: http://reviews.llvm.org/D4331

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