mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This allows reporting successful and unsuccessful optimizations similar to clang/llvm. This first patch adds support for the options -Rpass=<pass-name-regex> -Rpass-missed=<pass-name-regex>. These allow reporting successful/unsuccessful optimization on the compiler output for passes specified by the regex. I've also added one missed and one passed remark type to the inliner to test the infrastructure. Clang also has the option of collecting these records in an external YAML data file. This will be added in a later patch. A few notes: * The goal is to use this facility for both user-lever "performance" warnings and expert-level performance analysis. There will probably be a flag in the future differentiating the verbosity. * The intent is match clang/llvm as much as it makes sense. On the other hand I did make some changes. Unlike in llvm, the emitter is not a pass which simplifies things. Also the remark class hierarchy is greatly simplified since we don't derive from DiagnosticInfo. We also don't derive from Diagnostic to support the streaming API for arbitrary named-value pairs. * Currently function names are printed mangled which should be fixed.
61 KiB
61 KiB