diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-10-26 00:51:57 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-10-26 00:51:57 +0000 |
| commit | 90b2ac269608a52c73634ea997301d604068b41e (patch) | |
| tree | 50f07ac1174a1d4bb3cdcfe843e8e51096448c9e /llvm/lib/CodeGen | |
| parent | f86c939bfffd40c8b37315dfed44b9f27ce4349e (diff) | |
| download | bcm5719-llvm-90b2ac269608a52c73634ea997301d604068b41e.tar.gz bcm5719-llvm-90b2ac269608a52c73634ea997301d604068b41e.zip | |
For statistics that are only used in functions declared in !NDEBUG, wrap the
declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by
Matt Beaumont-Gay!
llvm-svn: 117345
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 69cdafc1b10..221e5183434 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -53,7 +53,9 @@ static cl::opt<bool> UnknownLocations("use-unknown-locations", cl::Hidden, cl::desc("Make an absense of debug location information explicit."), cl::init(false)); +#ifndef NDEBUG STATISTIC(BlocksWithoutLineNo, "Number of blocks without any line number"); +#endif namespace { const char *DWARFGroupName = "DWARF Emission"; diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7b7ea2b265a..26a672c0341 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -56,10 +56,13 @@ STATISTIC(NumFastIselFailures, "Number of instructions fast isel failed on"); STATISTIC(NumFastIselBlocks, "Number of blocks selected entirely by fast isel"); STATISTIC(NumDAGBlocks, "Number of blocks selected using DAG"); STATISTIC(NumDAGIselRetries,"Number of times dag isel has to try another path"); + +#ifndef NDEBUG STATISTIC(NumBBWithOutOfOrderLineInfo, "Number of blocks with out of order line number info"); STATISTIC(NumMBBWithOutOfOrderLineInfo, "Number of machine blocks with out of order line number info"); +#endif static cl::opt<bool> EnableFastISelVerbose("fast-isel-verbose", cl::Hidden, |

