[llvm] [tools][llc] Add `--save-stats` option (PR #163967)
Tomer Shafir via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 10:56:23 PDT 2025
tomershafir wrote:
- I think having ad hoc `--save-stats` gives you a more structured approach. A generic output like `--info-output-file=xxxx.json` can mix other streams which are not statistics too, then you'll have to parse it somehow.
- Adding it to libSupport would require some API so each tool submits an output filename, as each resolves it independently and the statistics object is static. So we'll need to inject it out of order and independently of statistics options, which I think can be a bit odd, but tolerable to reduce code duplication.
- I think `--save-stats=obj` is very useful for big projects to have file tree context, so Im against dropping this one. On the other hand, dropping `cwd` would break compatibility with Clang where its the default. So I think it may be better to keep it as is, given that its pretty simple logic.
https://github.com/llvm/llvm-project/pull/163967
More information about the llvm-commits
mailing list