[llvm] [llvm][Support] Enable pass timing in StandardInstrumentations constr… (PR #108983)
Tarun Prabhu via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 10:46:50 PDT 2024
tarunprabhu wrote:
The idea was to allow enabling timers using _either_ the `StandardInstrumentations` constructor, _or_ via the command line. In the first version of this PR, the arguments to the constructor were `std::optional<bool>` that defaulted to `std::nullopt`. If the arguments were not provided, the command-line would be used to determine if the timers were to be enabled. If arguments were passed to `StandardInstrumentations`, those would take priority and, potentially, override the command line options. For `clang` and `flang`, this is not an issue. The other LLVM tools that use `StandardInstrumentations` would not see any change in behavior.
However, this would only make things "cleaner" for the new pass manager. We could try to expose just this tiny bit of functionality in the legacy pass manager too, but I haven't looked too closely at that code to see if it would be feasible.
https://github.com/llvm/llvm-project/pull/108983
More information about the llvm-commits
mailing list