diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2018-04-09 23:09:27 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2018-04-09 23:09:27 +0000 |
commit | 0034e393d9bed8bcfb4070bafc99415209253331 (patch) | |
tree | 7610a637f7da2d61bc59fc23a549c81a48fbd85d /llvm/lib/Analysis/MemorySSA.cpp | |
parent | 1d92aa73803ae51aa92f02b291d4915010ebf0f4 (diff) | |
download | bcm5719-llvm-0034e393d9bed8bcfb4070bafc99415209253331.tar.gz bcm5719-llvm-0034e393d9bed8bcfb4070bafc99415209253331.zip |
[MemorySSA] remove cruft; NFC.
The caching walker used to hold its own caches, which made its `reset()`
function meaningful. Since caching has been moved out of it, there's no
reason to continue to have these cache-related methods.
Similarly, the EXPENSIVE_CHECKS block that's getting removed used to
rerun the query with caching disabled. Since that's how we always do
queries now, it's redundant.
llvm-svn: 329638
Diffstat (limited to 'llvm/lib/Analysis/MemorySSA.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemorySSA.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index e9afd669124..58170045aa0 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -849,8 +849,6 @@ public: ClobberWalker(const MemorySSA &MSSA, AliasAnalysis &AA, DominatorTree &DT) : MSSA(MSSA), AA(AA), DT(DT) {} - void reset() {} - /// Finds the nearest clobber for the given query, optimizing phis if /// possible. MemoryAccess *findClobber(MemoryAccess *Start, UpwardsMemoryQuery &Q) { @@ -912,7 +910,6 @@ namespace llvm { /// but the name has been retained for the moment. class MemorySSA::CachingWalker final : public MemorySSAWalker { ClobberWalker Walker; - bool AutoResetWalker = true; MemoryAccess *getClobberingMemoryAccess(MemoryAccess *, UpwardsMemoryQuery &); @@ -927,13 +924,6 @@ public: const MemoryLocation &) override; void invalidateInfo(MemoryAccess *) override; - /// Whether we call resetClobberWalker() after each time we *actually* walk to - /// answer a clobber query. - void setAutoResetWalker(bool AutoReset) { AutoResetWalker = AutoReset; } - - /// Drop the walker's persistent data structures. - void resetClobberWalker() { Walker.reset(); } - void verify(const MemorySSA *MSSA) override { MemorySSAWalker::verify(MSSA); Walker.verify(MSSA); @@ -1399,11 +1389,7 @@ void MemorySSA::buildMemorySSA() { CachingWalker *Walker = getWalkerImpl(); - // We're doing a batch of updates; don't drop useful caches between them. - Walker->setAutoResetWalker(false); OptimizeUses(this, Walker, AA, DT).optimizeUses(); - Walker->setAutoResetWalker(true); - Walker->resetClobberWalker(); // Mark the uses in unreachable blocks as live on entry, so that they go // somewhere. @@ -2020,15 +2006,7 @@ void MemorySSA::CachingWalker::invalidateInfo(MemoryAccess *MA) { /// \returns our clobbering memory access MemoryAccess *MemorySSA::CachingWalker::getClobberingMemoryAccess( MemoryAccess *StartingAccess, UpwardsMemoryQuery &Q) { - MemoryAccess *New = Walker.findClobber(StartingAccess, Q); -#ifdef EXPENSIVE_CHECKS - MemoryAccess *NewNoCache = Walker.findClobber(StartingAccess, Q); - assert(NewNoCache == New && "Cache made us hand back a different result?"); - (void)NewNoCache; -#endif - if (AutoResetWalker) - resetClobberWalker(); - return New; + return Walker.findClobber(StartingAccess, Q); } MemoryAccess *MemorySSA::CachingWalker::getClobberingMemoryAccess( |