summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2016-10-28 19:22:46 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2016-10-28 19:22:46 +0000
commit013fd7315ff206c42ae30bb115493e0583235bb3 (patch)
tree0e29be0d9ad2ba655ab23b423fe842d44d58978e /llvm
parent6200b2b67e51f810cfe58919b128c97e196c5482 (diff)
downloadbcm5719-llvm-013fd7315ff206c42ae30bb115493e0583235bb3.tar.gz
bcm5719-llvm-013fd7315ff206c42ae30bb115493e0583235bb3.zip
[MemorySSA] Add const to getClobberingMemoryAccess.
Thanks to bryant for the patch! Differential Revision: https://reviews.llvm.org/D26086 llvm-svn: 285432
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Transforms/Utils/MemorySSA.h4
-rw-r--r--llvm/lib/Transforms/Utils/MemorySSA.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Transforms/Utils/MemorySSA.h b/llvm/include/llvm/Transforms/Utils/MemorySSA.h
index d7c6b267910..7a014dda92f 100644
--- a/llvm/include/llvm/Transforms/Utils/MemorySSA.h
+++ b/llvm/include/llvm/Transforms/Utils/MemorySSA.h
@@ -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>;
diff --git a/llvm/lib/Transforms/Utils/MemorySSA.cpp b/llvm/lib/Transforms/Utils/MemorySSA.cpp
index 5eb0453317c..c71b72ab2eb 100644
--- a/llvm/lib/Transforms/Utils/MemorySSA.cpp
+++ b/llvm/lib/Transforms/Utils/MemorySSA.cpp
@@ -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;
OpenPOWER on IntegriCloud