[llvm] r270812 - MemorySSA: Remove argument to createNewAccess function.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 18:19:17 PDT 2016


Author: pcc
Date: Wed May 25 20:19:17 2016
New Revision: 270812

URL: http://llvm.org/viewvc/llvm-project?rev=270812&view=rev
Log:
MemorySSA: Remove argument to createNewAccess function.

There is only one caller of MemorySSA::createNewAccess, and it passes true
as the IgnoreNonMemory argument. Remove that argument and fold its behavior
into createNewAccess.

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=270812&r1=270811&r2=270812&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h Wed May 25 20:19:17 2016
@@ -575,7 +575,7 @@ private:
   void computeDomLevels(DenseMap<DomTreeNode *, unsigned> &DomLevels);
   void markUnreachableAsLiveOnEntry(BasicBlock *BB);
   bool dominatesUse(const MemoryAccess *, const MemoryAccess *) const;
-  MemoryUseOrDef *createNewAccess(Instruction *, bool ignoreNonMemory = false);
+  MemoryUseOrDef *createNewAccess(Instruction *);
   MemoryAccess *findDominatingDef(BasicBlock *, enum InsertionPlace);
   void removeFromLookups(MemoryAccess *);
 

Modified: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp?rev=270812&r1=270811&r2=270812&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp Wed May 25 20:19:17 2016
@@ -255,7 +255,7 @@ MemorySSAWalker *MemorySSA::buildMemoryS
     bool InsertIntoDef = false;
     AccessListType *Accesses = nullptr;
     for (Instruction &I : B) {
-      MemoryUseOrDef *MUD = createNewAccess(&I, true);
+      MemoryUseOrDef *MUD = createNewAccess(&I);
       if (!MUD)
         continue;
       InsertIntoDef |= isa<MemoryDef>(MUD);
@@ -353,8 +353,7 @@ MemorySSAWalker *MemorySSA::buildMemoryS
 }
 
 /// \brief Helper function to create new memory accesses
-MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
-                                           bool IgnoreNonMemory) {
+MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I) {
   // Find out what affect this instruction has on memory.
   ModRefInfo ModRef = AA->getModRefInfo(I);
   bool Def = bool(ModRef & MRI_Mod);
@@ -362,7 +361,7 @@ MemoryUseOrDef *MemorySSA::createNewAcce
 
   // It's possible for an instruction to not modify memory at all. During
   // construction, we ignore them.
-  if (IgnoreNonMemory && !Def && !Use)
+  if (!Def && !Use)
     return nullptr;
 
   assert((Def || Use) &&




More information about the llvm-commits mailing list