diff options
author | Jakub Kuderski <kubakuderski@gmail.com> | 2017-06-30 16:33:04 +0000 |
---|---|---|
committer | Jakub Kuderski <kubakuderski@gmail.com> | 2017-06-30 16:33:04 +0000 |
commit | 069e5cfaf1df6c8c71eb52b6f4d9ed410c459368 (patch) | |
tree | 9bbd9164b732beaefe0f940da5e8efd1c1bedacc /llvm/lib/IR/Dominators.cpp | |
parent | c41ba09433e48f4a3f760971971ae33ab08a1157 (diff) | |
download | bcm5719-llvm-069e5cfaf1df6c8c71eb52b6f4d9ed410c459368.tar.gz bcm5719-llvm-069e5cfaf1df6c8c71eb52b6f4d9ed410c459368.zip |
[Dominators] Do not perform expensive checks by default. Fix PR33656.
Summary:
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
[[ https://bugs.llvm.org/show_bug.cgi?id=33656 | PR33656 ]].
Note that this is only a temporary fix.
Reviewers: dberlin, chapuni, kparzysz, grosser
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34894
llvm-svn: 306839
Diffstat (limited to 'llvm/lib/IR/Dominators.cpp')
-rw-r--r-- | llvm/lib/IR/Dominators.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp index 6ac3c5e4632..9bd0e297f4e 100644 --- a/llvm/lib/IR/Dominators.cpp +++ b/llvm/lib/IR/Dominators.cpp @@ -292,7 +292,8 @@ bool DominatorTree::isReachableFromEntry(const Use &U) const { } 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(); |