[PATCH] D34894: [Dominators] Do not perform expensive checks by default. Fix PR33656.

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 09:25:25 PDT 2017


kuhar created this revision.
Herald added a reviewer: grosser.

Some transforms assume that DT.verifyDomInfo() is not expensive and call it even when ENABLE_EXPENSIVE_CHECKS is not set.
This patch disables expensive Dominator Tree verification (reachability, parent property, sibling property) to fix 
PR33656 <https://bugs.llvm.org/show_bug.cgi?id=33656>.

Note that this is only a temporary fix.


https://reviews.llvm.org/D34894

Files:
  lib/IR/Dominators.cpp


Index: lib/IR/Dominators.cpp
===================================================================
--- lib/IR/Dominators.cpp
+++ lib/IR/Dominators.cpp
@@ -292,7 +292,8 @@
 }
 
 void DominatorTree::verifyDomTree() const {
-  if (!verify()) {
+  // Perform the expensive checks only when VerifyDomInfo is set.
+  if (VerifyDomInfo && !verify()) {
     errs() << "\n~~~~~~~~~~~\n\t\tDomTree verification failed!\n~~~~~~~~~~~\n";
     print(errs());
     abort();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34894.104877.patch
Type: text/x-patch
Size: 458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/49ca93d7/attachment.bin>


More information about the llvm-commits mailing list