summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2018-06-22 22:34:07 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2018-06-22 22:34:07 +0000
commit2cbf9730b0201bd8545b7a6e2b087785f248418c (patch)
tree791d7e2d83b75ff7ac6412404c8c4a85ef693dcb /llvm/lib/Analysis
parent10e2f73793981045ae35239fc5590d131a486f11 (diff)
downloadbcm5719-llvm-2cbf9730b0201bd8545b7a6e2b087785f248418c.tar.gz
bcm5719-llvm-2cbf9730b0201bd8545b7a6e2b087785f248418c.zip
[MSSA] Remove incorrect comment + `auto`ify dyn_cast results; NFC
llvm-svn: 335399
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MemorySSA.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 1a0103dd363..0177f591ded 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -1573,19 +1573,18 @@ void MemorySSA::removeFromLookups(MemoryAccess *MA) {
assert(MA->use_empty() &&
"Trying to remove memory access that still has uses");
BlockNumbering.erase(MA);
- if (MemoryUseOrDef *MUD = dyn_cast<MemoryUseOrDef>(MA))
+ if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
MUD->setDefiningAccess(nullptr);
// Invalidate our walker's cache if necessary
if (!isa<MemoryUse>(MA))
Walker->invalidateInfo(MA);
- // The call below to erase will destroy MA, so we can't change the order we
- // are doing things here
+
Value *MemoryInst;
- if (MemoryUseOrDef *MUD = dyn_cast<MemoryUseOrDef>(MA)) {
+ if (const auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
MemoryInst = MUD->getMemoryInst();
- } else {
+ else
MemoryInst = MA->getBlock();
- }
+
auto VMA = ValueToMemoryAccess.find(MemoryInst);
if (VMA->second == MA)
ValueToMemoryAccess.erase(VMA);
OpenPOWER on IntegriCloud