[llvm] r260389 - Rename a member variable to be more accurate with how it is used

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 09:41:26 PST 2016


Author: dannyb
Date: Wed Feb 10 11:41:25 2016
New Revision: 260389

URL: http://llvm.org/viewvc/llvm-project?rev=260389&view=rev
Log:
Rename a member variable to be more accurate with how it is used

Modified:
    llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
    llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp

Modified: llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h?rev=260389&r1=260388&r2=260389&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h Wed Feb 10 11:41:25 2016
@@ -555,7 +555,7 @@ private:
   Function &F;
 
   // Memory SSA mappings
-  DenseMap<const Value *, MemoryAccess *> InstructionToMemoryAccess;
+  DenseMap<const Value *, MemoryAccess *> ValueToMemoryAccess;
   AccessMap PerBlockAccesses;
   std::unique_ptr<MemoryAccess> LiveOnEntryDef;
 

Modified: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp?rev=260389&r1=260388&r2=260389&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp Wed Feb 10 11:41:25 2016
@@ -320,7 +320,7 @@ MemorySSAWalker *MemorySSA::buildMemoryS
     // 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
 
   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 &
 }
 
 MemoryAccess *MemorySSA::getMemoryAccess(const Value *I) const {
-  return InstructionToMemoryAccess.lookup(I);
+  return ValueToMemoryAccess.lookup(I);
 }
 
 MemoryPhi *MemorySSA::getMemoryAccess(const BasicBlock *BB) const {




More information about the llvm-commits mailing list