mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	Revert r222997. The newly added compile-time checks are finding missing origins, testcase is being reduced and a PR will be posted shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -921,8 +921,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { | ||||
|             Value *OriginPtr = | ||||
|                 getOriginPtrForArgument(&FArg, EntryIRB, ArgOffset); | ||||
|             setOrigin(A, EntryIRB.CreateLoad(OriginPtr)); | ||||
|           } else { | ||||
|             setOrigin(A, getCleanOrigin()); | ||||
|           } | ||||
|         } | ||||
|         ArgOffset += RoundUpToAlignment(Size, kShadowTLSAlignment); | ||||
| @@ -942,14 +940,16 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { | ||||
|   /// \brief Get the origin for a value. | ||||
|   Value *getOrigin(Value *V) { | ||||
|     if (!MS.TrackOrigins) return nullptr; | ||||
|     if (!PropagateShadow) return getCleanOrigin(); | ||||
|     if (isa<Constant>(V)) return getCleanOrigin(); | ||||
|     assert((isa<Instruction>(V) || isa<Argument>(V)) && | ||||
|            "Unexpected value type in getOrigin()"); | ||||
|     if (isa<Instruction>(V) || isa<Argument>(V)) { | ||||
|       Value *Origin = OriginMap[V]; | ||||
|     assert(Origin && "Missing origin"); | ||||
|       if (!Origin) { | ||||
|         DEBUG(dbgs() << "NO ORIGIN: " << *V << "\n"); | ||||
|         Origin = getCleanOrigin(); | ||||
|       } | ||||
|       return Origin; | ||||
|     } | ||||
|     return getCleanOrigin(); | ||||
|   } | ||||
|  | ||||
|   /// \brief Get the origin for i-th argument of the instruction I. | ||||
|   Value *getOrigin(Instruction *I, int i) { | ||||
| @@ -1088,7 +1088,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { | ||||
|     IRB.CreateStore(getCleanShadow(&I), ShadowPtr); | ||||
|  | ||||
|     setShadow(&I, getCleanShadow(&I)); | ||||
|     setOrigin(&I, getCleanOrigin()); | ||||
|   } | ||||
|  | ||||
|   void visitAtomicRMWInst(AtomicRMWInst &I) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user