summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemorySSAUpdater.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2018-07-12 21:56:31 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2018-07-12 21:56:31 +0000
commite7cdb7edf74ab80fb24dc72468051e38a907ede1 (patch)
treeaf8418e0812ac0d931f76983c6652e2c40efe993 /llvm/lib/Analysis/MemorySSAUpdater.cpp
parent3b837b6b6310f379706d5cd5ecb21d7c99b4a407 (diff)
downloadbcm5719-llvm-e7cdb7edf74ab80fb24dc72468051e38a907ede1.tar.gz
bcm5719-llvm-e7cdb7edf74ab80fb24dc72468051e38a907ede1.zip
Remove redundant *_or_null checks; NFC
For the first one, we dereference `NewDef` right before the `if` anyway. For the second, we shouldn't have NULL users(). llvm-svn: 336952
Diffstat (limited to 'llvm/lib/Analysis/MemorySSAUpdater.cpp')
-rw-r--r--llvm/lib/Analysis/MemorySSAUpdater.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp
index 54184775e97..581fdf50d8b 100644
--- a/llvm/lib/Analysis/MemorySSAUpdater.cpp
+++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp
@@ -331,7 +331,7 @@ void MemorySSAUpdater::fixupDefs(const SmallVectorImpl<MemoryAccess *> &Vars) {
auto DefIter = NewDef->getDefsIterator();
// The temporary Phi is being fixed, unmark it for not to optimize.
- if (MemoryPhi *Phi = dyn_cast_or_null<MemoryPhi>(NewDef))
+ if (MemoryPhi *Phi = dyn_cast<MemoryPhi>(NewDef))
NonOptPhis.erase(Phi);
// If there is a local def after us, we only have to rename that.
@@ -395,7 +395,7 @@ void MemorySSAUpdater::moveTo(MemoryUseOrDef *What, BasicBlock *BB,
WhereType Where) {
// Mark MemoryPhi users of What not to be optimized.
for (auto *U : What->users())
- if (MemoryPhi *PhiUser = dyn_cast_or_null<MemoryPhi>(U))
+ if (MemoryPhi *PhiUser = dyn_cast<MemoryPhi>(U))
NonOptPhis.insert(PhiUser);
// Replace all our users with our defining access.
OpenPOWER on IntegriCloud