Index: include/llvm/Transforms/Utils/MemorySSA.h =================================================================== --- include/llvm/Transforms/Utils/MemorySSA.h +++ 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 *, - const MemoryLocation &) = 0; + 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 *, - const MemoryLocation &) override; + MemoryLocation &) override; }; using MemoryAccessPair = std::pair; Index: lib/Transforms/Utils/MemorySSA.cpp =================================================================== --- lib/Transforms/Utils/MemorySSA.cpp +++ lib/Transforms/Utils/MemorySSA.cpp @@ -1097,7 +1097,7 @@ using MemorySSAWalker::getClobberingMemoryAccess; MemoryAccess *getClobberingMemoryAccess(MemoryAccess *) override; MemoryAccess *getClobberingMemoryAccess(MemoryAccess *, - const MemoryLocation &) override; + 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, const MemoryLocation &Loc) { + MemoryAccess *StartingAccess, MemoryLocation &Loc) { if (isa(StartingAccess)) return StartingAccess; @@ -2266,7 +2266,7 @@ } MemoryAccess *DoNothingMemorySSAWalker::getClobberingMemoryAccess( - MemoryAccess *StartingAccess, const MemoryLocation &) { + MemoryAccess *StartingAccess, MemoryLocation &) { if (auto *Use = dyn_cast(StartingAccess)) return Use->getDefiningAccess(); return StartingAccess;