[llvm] 480a5a2 - IR: move the declaration of `VerifyDomInfo` (NFC)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 08:36:51 PDT 2021


Author: Saleem Abdulrasool
Date: 2021-09-08T08:36:03-07:00
New Revision: 480a5a2d96c59572a1900d42aca50953ddc11055

URL: https://github.com/llvm/llvm-project/commit/480a5a2d96c59572a1900d42aca50953ddc11055
DIFF: https://github.com/llvm/llvm-project/commit/480a5a2d96c59572a1900d42aca50953ddc11055.diff

LOG: IR: move the declaration of `VerifyDomInfo` (NFC)

This moves the declaration of `VerifyDomInfo` into
`llvm/IR/Dominators.h` from `llvm/Support/Debug.h`.  Although this is a
debugging utility, the definition of the symbol is in LLVMIR, not in
LLVMSupport.  This moves the declaration to the containing modules'
header.

Reviewed By: rnk, mehdhi_amini

Differential Revision: https://reviews.llvm.org/D109395

Added: 
    

Modified: 
    llvm/include/llvm/IR/Dominators.h
    llvm/include/llvm/Support/Debug.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/Dominators.h b/llvm/include/llvm/IR/Dominators.h
index 4d140c3ad0f2c..475355af5647f 100644
--- a/llvm/include/llvm/IR/Dominators.h
+++ b/llvm/include/llvm/IR/Dominators.h
@@ -277,6 +277,12 @@ struct DominatorTreeVerifierPass : PassInfoMixin<DominatorTreeVerifierPass> {
   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
 };
 
+/// Enables verification of dominator trees.
+///
+/// This check is expensive and is disabled by default.  `-verify-dom-info`
+/// allows selectively enabling the check without needing to recompile.
+extern bool VerifyDomInfo;
+
 /// Legacy analysis pass which computes a \c DominatorTree.
 class DominatorTreeWrapperPass : public FunctionPass {
   DominatorTree DT;

diff  --git a/llvm/include/llvm/Support/Debug.h b/llvm/include/llvm/Support/Debug.h
index 64b730951bdab..184a3f363fda8 100644
--- a/llvm/include/llvm/Support/Debug.h
+++ b/llvm/include/llvm/Support/Debug.h
@@ -85,10 +85,6 @@ extern bool DebugFlag;
 /// turning the checks on without need to recompile.
 /// \{
 
-/// Enables verification of dominator trees.
-///
-extern bool VerifyDomInfo;
-
 /// Enables verification of loop info.
 ///
 extern bool VerifyLoopInfo;


        


More information about the llvm-commits mailing list