[PATCH] D26086: [MemorySSA] Const correctness. NFC.

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 12:32:13 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL285432: [MemorySSA] Add const to getClobberingMemoryAccess. (authored by gbiv).

Changed prior to commit:
  https://reviews.llvm.org/D26086?vs=76220&id=76237#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26086

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


Index: llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
===================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
+++ llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
@@ -783,7 +783,7 @@
   /// will return that MemoryDef, whereas the above would return the clobber
   /// starting from the use side of  the memory def.
   virtual MemoryAccess *getClobberingMemoryAccess(MemoryAccess *,
-                                                  MemoryLocation &) = 0;
+                                                  const MemoryLocation &) = 0;
 
   /// \brief Given a memory access, invalidate anything this walker knows about
   /// that access.
@@ -809,7 +809,7 @@
   using MemorySSAWalker::getClobberingMemoryAccess;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *) override;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *,
-                                          MemoryLocation &) override;
+                                          const MemoryLocation &) override;
 };
 
 using MemoryAccessPair = std::pair<MemoryAccess *, MemoryLocation>;
Index: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
@@ -1097,7 +1097,7 @@
   using MemorySSAWalker::getClobberingMemoryAccess;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *) override;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *,
-                                          MemoryLocation &) override;
+                                          const MemoryLocation &) override;
   void invalidateInfo(MemoryAccess *) override;
 
   /// Whether we call resetClobberWalker() after each time we *actually* walk to
@@ -2163,7 +2163,7 @@
 }
 
 MemoryAccess *MemorySSA::CachingWalker::getClobberingMemoryAccess(
-    MemoryAccess *StartingAccess, MemoryLocation &Loc) {
+    MemoryAccess *StartingAccess, const MemoryLocation &Loc) {
   if (isa<MemoryPhi>(StartingAccess))
     return StartingAccess;
 
@@ -2266,7 +2266,7 @@
 }
 
 MemoryAccess *DoNothingMemorySSAWalker::getClobberingMemoryAccess(
-    MemoryAccess *StartingAccess, MemoryLocation &) {
+    MemoryAccess *StartingAccess, const MemoryLocation &) {
   if (auto *Use = dyn_cast<MemoryUseOrDef>(StartingAccess))
     return Use->getDefiningAccess();
   return StartingAccess;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26086.76237.patch
Type: text/x-patch
Size: 2469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/6f359cf0/attachment.bin>


More information about the llvm-commits mailing list