[PATCH] D50749: [MemorySSA] Expose the verify as a debug option.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 15 10:32:40 PDT 2018
asbirlea updated this revision to Diff 160843.
asbirlea added a comment.
Address comments.
Thank you for the review!
Repository:
rL LLVM
https://reviews.llvm.org/D50749
Files:
include/llvm/Support/Debug.h
lib/Analysis/MemorySSA.cpp
Index: lib/Analysis/MemorySSA.cpp
===================================================================
--- lib/Analysis/MemorySSA.cpp
+++ lib/Analysis/MemorySSA.cpp
@@ -77,9 +77,15 @@
cl::desc("The maximum number of stores/phis MemorySSA"
"will consider trying to walk past (default = 100)"));
-static cl::opt<bool>
- VerifyMemorySSA("verify-memoryssa", cl::init(false), cl::Hidden,
- cl::desc("Verify MemorySSA in legacy printer pass."));
+// Always verify MemorySSA if expensive checking is enabled.
+#ifdef EXPENSIVE_CHECKS
+bool llvm::VerifyMemorySSA = true;
+#else
+bool llvm::VerifyMemorySSA = false;
+#endif
+static cl::opt<bool, true>
+ VerifyMemorySSAX("verify-memoryssa", cl::location(VerifyMemorySSA),
+ cl::Hidden, cl::desc("Enable verification of MemorySSA."));
namespace llvm {
Index: include/llvm/Support/Debug.h
===================================================================
--- include/llvm/Support/Debug.h
+++ include/llvm/Support/Debug.h
@@ -94,6 +94,10 @@
///
extern bool VerifyLoopInfo;
+/// Enables verification of MemorySSA.
+///
+extern bool VerifyMemorySSA;
+
///\}
/// EnableDebugBuffering - This defaults to false. If true, the debug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50749.160843.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180815/16679c55/attachment-0001.bin>
More information about the llvm-commits
mailing list