[MLIR][Wasm] Remove statistics as they depend on global ctors (#153795)
Use a debug log instead for now.
This commit is contained in:
parent
4f65345ab5
commit
7640645f79
@ -30,12 +30,6 @@
|
||||
|
||||
#define DEBUG_TYPE "wasm-translate"
|
||||
|
||||
// Statistics.
|
||||
STATISTIC(numFunctionSectionItems, "Parsed functions");
|
||||
STATISTIC(numGlobalSectionItems, "Parsed globals");
|
||||
STATISTIC(numMemorySectionItems, "Parsed memories");
|
||||
STATISTIC(numTableSectionItems, "Parsed tables");
|
||||
|
||||
static_assert(CHAR_BIT == 8,
|
||||
"This code expects std::byte to be exactly 8 bits");
|
||||
|
||||
@ -1047,10 +1041,12 @@ public:
|
||||
return;
|
||||
|
||||
// Copy over sizes of containers into statistics.
|
||||
numFunctionSectionItems = symbols.funcSymbols.size();
|
||||
numGlobalSectionItems = symbols.globalSymbols.size();
|
||||
numMemorySectionItems = symbols.memSymbols.size();
|
||||
numTableSectionItems = symbols.tableSymbols.size();
|
||||
LDBG() << "WASM Imports:"
|
||||
<< "\n"
|
||||
<< " - Num functions: " << symbols.funcSymbols.size() << "\n"
|
||||
<< " - Num globals: " << symbols.globalSymbols.size() << "\n"
|
||||
<< " - Num memories: " << symbols.memSymbols.size() << "\n"
|
||||
<< " - Num tables: " << symbols.tableSymbols.size();
|
||||
}
|
||||
|
||||
ModuleOp getModule() {
|
||||
|
@ -1,19 +0,0 @@
|
||||
// RUN: yaml2obj %S/inputs/stats.yaml.wasm -o - | mlir-translate --import-wasm -stats 2>&1 | FileCheck %s
|
||||
// Check that we get the correct stats for a module that has a single
|
||||
// function, table, memory, and global.
|
||||
// REQUIRES: asserts
|
||||
|
||||
/* Source code used to create this test:
|
||||
(module
|
||||
(type (;0;) (func (param i32) (result i32)))
|
||||
(func (;0;) (type 0) (param i32) (result i32)
|
||||
local.get 0)
|
||||
(table (;0;) 2 funcref)
|
||||
(memory (;0;) 0 65536)
|
||||
(global (;0;) i32 (i32.const 10)))
|
||||
*/
|
||||
|
||||
// CHECK: 1 wasm-translate - Parsed functions
|
||||
// CHECK-NEXT: 0 wasm-translate - Parsed globals
|
||||
// CHECK-NEXT: 1 wasm-translate - Parsed memories
|
||||
// CHECK-NEXT: 1 wasm-translate - Parsed tables
|
Loading…
x
Reference in New Issue
Block a user