]> granicus.if.org Git - llvm/commitdiff
[DebugCounter] Move the semicolon out of the DEBUG_COUNTER macro and require it to...
authorCraig Topper <craig.topper@intel.com>
Thu, 10 Aug 2017 17:48:11 +0000 (17:48 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 10 Aug 2017 17:48:11 +0000 (17:48 +0000)
This make it consistent with STATISTIC which it will often appears near.

While there move one DEBUG_COUNTER instance out of an anonymous namespace. It's already declaring a static variable so the namespace is unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310637 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ProgrammersManual.rst
include/llvm/Support/DebugCounter.h
lib/Transforms/Scalar/NewGVN.cpp
lib/Transforms/Utils/PredicateInfo.cpp

index 3c78ee14b5a4c3cb437fca2c4fdff35df83821d3..7541f2eba8d2904fa9965e13917d0ec3b4adcedb 100644 (file)
@@ -1224,7 +1224,7 @@ Define your DebugCounter like this:
 .. code-block:: c++
 
   DEBUG_COUNTER(DeleteAnInstruction, "passname-delete-instruction",
-               "Controls which instructions get delete")
+               "Controls which instructions get delete");
 
 The ``DEBUG_COUNTER`` macro defines a static variable, whose name
 is specified by the first argument.  The name of the counter
index a533feae7fa38e1a1d98345520374b5b57654d23..52e1bd71a2f2b350a7f6c7535467bc90acc528d8 100644 (file)
@@ -159,7 +159,7 @@ private:
 
 #define DEBUG_COUNTER(VARNAME, COUNTERNAME, DESC)                              \
   static const unsigned VARNAME =                                              \
-      DebugCounter::registerCounter(COUNTERNAME, DESC);
+      DebugCounter::registerCounter(COUNTERNAME, DESC)
 
 } // namespace llvm
 #endif
index ceb53502f982cfa64d94794538541029ff5676ab..1afbde991f8f2855e6343069513d1763960b7c0e 100644 (file)
@@ -118,9 +118,9 @@ STATISTIC(NumGVNPHIOfOpsCreated, "Number of PHI of ops created");
 STATISTIC(NumGVNPHIOfOpsEliminations,
           "Number of things eliminated using PHI of ops");
 DEBUG_COUNTER(VNCounter, "newgvn-vn",
-              "Controls which instructions are value numbered")
+              "Controls which instructions are value numbered");
 DEBUG_COUNTER(PHIOfOpsCounter, "newgvn-phi",
-              "Controls which instructions we create phi of ops for")
+              "Controls which instructions we create phi of ops for");
 // Currently store defining access refinement is too slow due to basicaa being
 // egregiously slow.  This flag lets us keep it working while we work on this
 // issue.
index d4cdaede6b86b4cc5c5ed4adbc5d66a0024fe3bc..16b80923bf5524c467f75c6895dba17ac15cce2c 100644 (file)
@@ -49,9 +49,10 @@ INITIALIZE_PASS_END(PredicateInfoPrinterLegacyPass, "print-predicateinfo",
 static cl::opt<bool> VerifyPredicateInfo(
     "verify-predicateinfo", cl::init(false), cl::Hidden,
     cl::desc("Verify PredicateInfo in legacy printer pass."));
-namespace {
 DEBUG_COUNTER(RenameCounter, "predicateinfo-rename",
-              "Controls which variables are renamed with predicateinfo")
+              "Controls which variables are renamed with predicateinfo");
+
+namespace {
 // Given a predicate info that is a type of branching terminator, get the
 // branching block.
 const BasicBlock *getBranchBlock(const PredicateBase *PB) {