[msan] Kill -msan-store-clean-origin flag.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 18 Mar 2014 09:47:06 +0000 (09:47 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 18 Mar 2014 09:47:06 +0000 (09:47 +0000)
Not only is it slower than the alternative, but also subtly broken.
This commit does not change the default behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204131 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/MemorySanitizer.cpp

index 7b966565f057039a38affcb9acf8c090737d6672..99114d1414f92d09861bf669df94163353be55f7 100644 (file)
@@ -160,10 +160,6 @@ static cl::opt<bool> ClHandleICmpExact("msan-handle-icmp-exact",
        cl::desc("exact handling of relational integer ICmp"),
        cl::Hidden, cl::init(false));
 
-static cl::opt<bool> ClStoreCleanOrigin("msan-store-clean-origin",
-       cl::desc("store origin for clean (fully initialized) values"),
-       cl::Hidden, cl::init(false));
-
 // This flag controls whether we check the shadow of the address
 // operand of load or store. Such bugs are very rare, since load from
 // a garbage address typically results in SEGV, but still happen
@@ -547,7 +543,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
 
       if (MS.TrackOrigins) {
         unsigned Alignment = std::max(kMinOriginAlignment, I.getAlignment());
-        if (ClStoreCleanOrigin || isa<StructType>(Shadow->getType())) {
+        if (isa<StructType>(Shadow->getType())) {
           IRB.CreateAlignedStore(getOrigin(Val), getOriginPtr(Addr, IRB),
                                  Alignment);
         } else {