[MSAN] Avoid dangling ActualFnStart when replacing instruction
authorGui Andrade <guiand@google.com>
Fri, 14 Aug 2020 23:34:16 +0000 (23:34 +0000)
committerGui Andrade <guiand@google.com>
Fri, 14 Aug 2020 23:50:38 +0000 (23:50 +0000)
commit05e3ab41e418e3d19541b7e88587f8302888e5ab
tree40d4d5a2bc9fc2963b12ce70a73964071ea1486e
parent92593f9e77c387cee1ab5573b2f4b5c42162e8b8
[MSAN] Avoid dangling ActualFnStart when replacing instruction

This would be a problem if the entire instrumented function was a call
to
e.g. memcpy

Use FnPrologueEnd Instruction* instead of ActualFnStart BB*

Differential Revision: https://reviews.llvm.org/D86001
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/test/Instrumentation/MemorySanitizer/array_types.ll
llvm/test/Instrumentation/MemorySanitizer/attributes.ll
llvm/test/Instrumentation/MemorySanitizer/clmul.ll
llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
llvm/test/Instrumentation/MemorySanitizer/msan_eager.ll
llvm/test/Instrumentation/MemorySanitizer/msan_kernel_basic.ll
llvm/test/Instrumentation/MemorySanitizer/msan_x86intrinsics.ll
llvm/test/Instrumentation/MemorySanitizer/unsized_type.ll