Skip to content

Commit 7640645

Browse files
authored
[MLIR][Wasm] Remove statistics as they depend on global ctors (llvm#153795)
Use a debug log instead for now.
1 parent 4f65345 commit 7640645

File tree

2 files changed

+6
-29
lines changed

2 files changed

+6
-29
lines changed

mlir/lib/Target/Wasm/TranslateFromWasm.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030

3131
#define DEBUG_TYPE "wasm-translate"
3232

33-
// Statistics.
34-
STATISTIC(numFunctionSectionItems, "Parsed functions");
35-
STATISTIC(numGlobalSectionItems, "Parsed globals");
36-
STATISTIC(numMemorySectionItems, "Parsed memories");
37-
STATISTIC(numTableSectionItems, "Parsed tables");
38-
3933
static_assert(CHAR_BIT == 8,
4034
"This code expects std::byte to be exactly 8 bits");
4135

@@ -1047,10 +1041,12 @@ class WasmBinaryParser {
10471041
return;
10481042

10491043
// Copy over sizes of containers into statistics.
1050-
numFunctionSectionItems = symbols.funcSymbols.size();
1051-
numGlobalSectionItems = symbols.globalSymbols.size();
1052-
numMemorySectionItems = symbols.memSymbols.size();
1053-
numTableSectionItems = symbols.tableSymbols.size();
1044+
LDBG() << "WASM Imports:"
1045+
<< "\n"
1046+
<< " - Num functions: " << symbols.funcSymbols.size() << "\n"
1047+
<< " - Num globals: " << symbols.globalSymbols.size() << "\n"
1048+
<< " - Num memories: " << symbols.memSymbols.size() << "\n"
1049+
<< " - Num tables: " << symbols.tableSymbols.size();
10541050
}
10551051

10561052
ModuleOp getModule() {

mlir/test/Target/Wasm/stats.mlir

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)