Skip to content

Commit 2e5f666

Browse files
committed
Make debug counters available in non-assert builds as well
Differential Revision: https://reviews.llvm.org/D149232
1 parent 039ae62 commit 2e5f666

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

mlir/lib/Debug/DebugCounter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ void DebugCounter::print(raw_ostream &os) const {
110110
/// various flags within the DebugCounter. These flags are used when
111111
/// constructing a DebugCounter for initialization.
112112
void DebugCounter::registerCLOptions() {
113-
#ifndef NDEBUG
114113
// Make sure that the options struct has been initialized.
115114
*clOptions;
116-
#endif
117115
}
118116

119117
bool DebugCounter::isActivated() {

mlir/test/mlir-opt/debugcounter.mlir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This test exercises the example in docs/ActionTracing.md ; changes here
22
// should probably be reflected there.
33

4-
// REQUIRES: asserts
54
// RUN: mlir-opt %s -mlir-debug-counter=unique-tag-for-my-action-skip=-1 -mlir-print-debug-counter --pass-pipeline="builtin.module(func.func(canonicalize))" --mlir-disable-threading 2>&1 | FileCheck %s --check-prefix=CHECK-UNKNOWN-TAG
65
// RUN: mlir-opt %s -mlir-debug-counter=pass-execution-skip=1 -mlir-print-debug-counter --pass-pipeline="builtin.module(func.func(canonicalize))" --mlir-disable-threading 2>&1 | FileCheck %s --check-prefix=CHECK-PASS
76

0 commit comments

Comments
 (0)