[PATCH] D101211: [ADT] Remove StatisticBase and make NoopStatistic empty
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 16:26:36 PDT 2021
MaskRay added a subscriber: rriddle.
MaskRay added a comment.
@rriddle llvm+clang has ~1000 `llvm::Statistic` global variables. This patch can avoid the space consumption (24KiB in .bss, and more in .rodata) in a `-DLLVM_ENABLE_ASSERTIONS=off` build because the pointers are mostly unused.
`mlir/lib/Pass/PassStatistics.cpp` seems to dump the names even in `-DLLVM_ENABLE_ASSERTIONS=off` builds? Those statistics will have names but no counts. If the statistics are not useful in `-DLLVM_ENABLE_ASSERTIONS=off` builds, I'll just remove `using llvm::Statistic::getDebugType;` from `mlir/include/mlir/Pass/Pass.h` and reland this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101211/new/
https://reviews.llvm.org/D101211
More information about the llvm-commits
mailing list