[llvm-branch-commits] [llvm] 593a0dd - [MemorySSA] Don't verify MemorySSA unless VerifyMemorySSA enabled
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 27 02:41:46 PST 2020
Author: Nikita Popov
Date: 2020-02-27T11:39:13+01:00
New Revision: 593a0dda7a683df9b3744c6391bb2f8de9ed5908
URL: https://github.com/llvm/llvm-project/commit/593a0dda7a683df9b3744c6391bb2f8de9ed5908
DIFF: https://github.com/llvm/llvm-project/commit/593a0dda7a683df9b3744c6391bb2f8de9ed5908.diff
LOG: [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)
Added:
Modified:
llvm/lib/Analysis/MemorySSA.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index bf8dc94bfbf9..77f4125b5d4b 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);
More information about the llvm-branch-commits
mailing list