summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2017-01-24 05:52:07 +0000
committerSerge Pavlov <sepavloff@gmail.com>2017-01-24 05:52:07 +0000
commit69b3ff9d93d7ace79b541581c59f151630e79e73 (patch)
tree7c020c461aac39c5009c68e6ea170f454bc60fa1 /llvm/lib/IR
parent463e2a6f3da74d2f74400b15a18cfdfb63f12dbf (diff)
downloadbcm5719-llvm-69b3ff9d93d7ace79b541581c59f151630e79e73.tar.gz
bcm5719-llvm-69b3ff9d93d7ace79b541581c59f151630e79e73.zip
Make VerifyDomInfo and VerifyLoopInfo global variables
Verifications of dominator tree and loop info are expensive operations so they are disabled by default. They can be enabled by command line options -verify-dom-info and -verify-loop-info. These options however enable checks only in files Dominators.cpp and LoopInfo.cpp. If some transformation changes dominaror tree and/or loop info, it would be convenient to place similar checks to the files implementing the transformation. This change makes corresponding flags global, so they can be used in any file to optionally turn verification on. llvm-svn: 292889
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Dominators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp
index 009326825cd..44948cc5831 100644
--- a/llvm/lib/IR/Dominators.cpp
+++ b/llvm/lib/IR/Dominators.cpp
@@ -29,9 +29,9 @@ using namespace llvm;
// Always verify dominfo if expensive checking is enabled.
#ifdef EXPENSIVE_CHECKS
-static bool VerifyDomInfo = true;
+bool llvm::VerifyDomInfo = true;
#else
-static bool VerifyDomInfo = false;
+bool llvm::VerifyDomInfo = false;
#endif
static cl::opt<bool,true>
VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo),
OpenPOWER on IntegriCloud