From f6c9ae9c6d83133d49db42925f2b1ed490b788b6 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Wed, 10 Feb 2016 17:41:25 +0000 Subject: Rename a member variable to be more accurate with how it is used llvm-svn: 260389 --- llvm/lib/Transforms/Utils/MemorySSA.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Utils/MemorySSA.cpp b/llvm/lib/Transforms/Utils/MemorySSA.cpp index faa25b5ade8..b162567c69b 100644 --- a/llvm/lib/Transforms/Utils/MemorySSA.cpp +++ b/llvm/lib/Transforms/Utils/MemorySSA.cpp @@ -320,7 +320,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA, // Insert phi node AccessListType *Accesses = getOrCreateAccessList(BB); MemoryPhi *Phi = new MemoryPhi(F.getContext(), BB, NextID++); - InstructionToMemoryAccess.insert(std::make_pair(BB, Phi)); + ValueToMemoryAccess.insert(std::make_pair(BB, Phi)); // Phi's always are placed at the front of the block. Accesses->push_front(Phi); } @@ -375,12 +375,10 @@ MemoryAccess *MemorySSA::createNewAccess(Instruction *I, bool IgnoreNonMemory) { MemoryUseOrDef *MA; if (Def) - MA = new MemoryDef(I->getContext(), nullptr, I, I->getParent(), - NextID++); + MA = new MemoryDef(I->getContext(), nullptr, I, I->getParent(), NextID++); else - MA = - new MemoryUse(I->getContext(), nullptr, I, I->getParent()); - InstructionToMemoryAccess.insert(std::make_pair(I, MA)); + MA = new MemoryUse(I->getContext(), nullptr, I, I->getParent()); + ValueToMemoryAccess.insert(std::make_pair(I, MA)); return MA; } @@ -533,7 +531,7 @@ void MemorySSA::verifyDefUses(Function &F) const { } MemoryAccess *MemorySSA::getMemoryAccess(const Value *I) const { - return InstructionToMemoryAccess.lookup(I); + return ValueToMemoryAccess.lookup(I); } MemoryPhi *MemorySSA::getMemoryAccess(const BasicBlock *BB) const { -- cgit v1.2.3