diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-12 22:25:27 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-02-27 11:39:13 +0100 |
commit | 593a0dda7a683df9b3744c6391bb2f8de9ed5908 (patch) | |
tree | 9a4e4771a3f27b5634fdef41ee08a68549470d7a | |
parent | 00f4618182ada5316650eebedac3702b73819ec0 (diff) | |
download | bcm5719-llvm-593a0dda7a683df9b3744c6391bb2f8de9ed5908.tar.gz bcm5719-llvm-593a0dda7a683df9b3744c6391bb2f8de9ed5908.zip |
[MemorySSA] Don't verify MemorySSA unless VerifyMemorySSA enabled
MemorySSA is often taking up an unreasonable fraction of runtime in
assertion enabled builds. Turns out that there is one code-path that
runs verifyMemorySSA() even if VerifyMemorySSA is not enabled. This
patch makes it conditional as well.
Differential Revision: https://reviews.llvm.org/D74505
(cherry picked from commit f0b57d8071853ec2ab459c0492854c67ea4fa93c)
-rw-r--r-- | llvm/lib/Analysis/MemorySSA.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index bf8dc94bfbf..77f4125b5d4 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -2298,7 +2298,10 @@ bool MemorySSAWrapperPass::runOnFunction(Function &F) { return false; } -void MemorySSAWrapperPass::verifyAnalysis() const { MSSA->verifyMemorySSA(); } +void MemorySSAWrapperPass::verifyAnalysis() const { + if (VerifyMemorySSA) + MSSA->verifyMemorySSA(); +} void MemorySSAWrapperPass::print(raw_ostream &OS, const Module *M) const { MSSA->print(OS); |