[llvm] r260015 - Don't use module context here. It's unnecessary and makes it harder to write unittests
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 6 18:03:39 PST 2016
Author: dannyb
Date: Sat Feb 6 20:03:39 2016
New Revision: 260015
URL: http://llvm.org/viewvc/llvm-project?rev=260015&view=rev
Log:
Don't use module context here. It's unnecessary and makes it harder to write unittests
Modified:
llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp?rev=260015&r1=260014&r2=260015&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp Sat Feb 6 20:03:39 2016
@@ -375,11 +375,11 @@ MemoryAccess *MemorySSA::createNewAccess
MemoryUseOrDef *MA;
if (Def)
- MA = new MemoryDef(I->getModule()->getContext(), nullptr, I, I->getParent(),
+ MA = new MemoryDef(I->getContext(), nullptr, I, I->getParent(),
NextID++);
else
MA =
- new MemoryUse(I->getModule()->getContext(), nullptr, I, I->getParent());
+ new MemoryUse(I->getContext(), nullptr, I, I->getParent());
InstructionToMemoryAccess.insert(std::make_pair(I, MA));
return MA;
}
More information about the llvm-commits
mailing list