summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
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/Analysis
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/Analysis')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index e7e7612a66d..ff68810abb8 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -40,9 +40,9 @@ template class llvm::LoopInfoBase<BasicBlock, Loop>;
// Always verify loopinfo if expensive checking is enabled.
#ifdef EXPENSIVE_CHECKS
-static bool VerifyLoopInfo = true;
+bool llvm::VerifyLoopInfo = true;
#else
-static bool VerifyLoopInfo = false;
+bool llvm::VerifyLoopInfo = false;
#endif
static cl::opt<bool,true>
VerifyLoopInfoX("verify-loop-info", cl::location(VerifyLoopInfo),
OpenPOWER on IntegriCloud