]> granicus.if.org Git - llvm/commitdiff
[MemorySSA] Add const to getClobberingMemoryAccess.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Fri, 28 Oct 2016 19:22:46 +0000 (19:22 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Fri, 28 Oct 2016 19:22:46 +0000 (19:22 +0000)
Thanks to bryant for the patch!

Differential Revision: https://reviews.llvm.org/D26086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285432 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/MemorySSA.h
lib/Transforms/Utils/MemorySSA.cpp

index d7c6b26791044c25cf145ac0f6adee123bf29bc6..7a014dda92fa034bb3cc4d5d14eb07dfa93141ac 100644 (file)
@@ -783,7 +783,7 @@ public:
   /// 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 @@ public:
   using MemorySSAWalker::getClobberingMemoryAccess;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *) override;
   MemoryAccess *getClobberingMemoryAccess(MemoryAccess *,
-                                          MemoryLocation &) override;
+                                          const MemoryLocation &) override;
 };
 
 using MemoryAccessPair = std::pair<MemoryAccess *, MemoryLocation>;
index 5eb0453317cbe5d6c6c96b7b38afcc9e3255c899..c71b72ab2ebeed88f6ea024b14abbce727c39e44 100644 (file)
@@ -1097,7 +1097,7 @@ public:
   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 *MemorySSA::CachingWalker::getClobberingMemoryAccess(
-    MemoryAccess *StartingAccess, MemoryLocation &Loc) {
+    MemoryAccess *StartingAccess, const MemoryLocation &Loc) {
   if (isa<MemoryPhi>(StartingAccess))
     return StartingAccess;
 
@@ -2266,7 +2266,7 @@ DoNothingMemorySSAWalker::getClobberingMemoryAccess(MemoryAccess *MA) {
 }
 
 MemoryAccess *DoNothingMemorySSAWalker::getClobberingMemoryAccess(
-    MemoryAccess *StartingAccess, MemoryLocation &) {
+    MemoryAccess *StartingAccess, const MemoryLocation &) {
   if (auto *Use = dyn_cast<MemoryUseOrDef>(StartingAccess))
     return Use->getDefiningAccess();
   return StartingAccess;