[cfe-commits] [PATCH] [msan] Add simplifycfg before msan at O0
Evgeniy Stepanov
eugenis at google.com
Tue Dec 11 23:33:34 PST 2012
Hi kcc,
MemorySanitizer can't handle unreachable BB's
http://llvm-reviews.chandlerc.com/D207
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp
+++ lib/CodeGen/BackendUtil.cpp
@@ -188,6 +188,9 @@
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
PassManagerBase &PM) {
+ // MSan does not like unreachable BB's.
+ if (Builder.OptLevel == 0)
+ PM.add(createCFGSimplificationPass());
PM.add(createMemorySanitizerPass());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D207.1.patch
Type: text/x-patch
Size: 566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121211/1869a9ca/attachment.bin>
More information about the cfe-commits
mailing list