[llvm] [opt] Add --save-stats option (PR #167304)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 11 05:44:25 PST 2025
================
@@ -203,6 +213,17 @@ LLVM_ABI Expected<std::unique_ptr<TargetMachine>> createTargetMachineForTriple(
StringRef TargetTriple,
CodeGenOptLevel OptLevel = CodeGenOptLevel::Default);
+/// Conditionally enables the collection of LLVM statistics during the tool run,
+/// based on the value of the flag. Must be call before the tool run to actually
+/// collect data.
+LLVM_ABI int MaybeEnableStatistics();
+
+/// Conditionally saves the collected LLVM statistics to the recevied output
+/// file, based on the value of the flag. Shuould be called after the tool run,
----------------
dtcxzyw wrote:
```suggestion
/// file, based on the value of the flag. Should be called after the tool run,
```
https://github.com/llvm/llvm-project/pull/167304
More information about the llvm-commits
mailing list