rust/compiler/rustc_session/src
bors 131a03664e Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko
Add `-Zremark-dir` unstable flag to write LLVM optimization remarks to YAML

This PR adds an option for `rustc` to emit LLVM optimization remarks to a set of YAML files, which can then be digested by existing tools, like https://github.com/OfekShilon/optview2. When `-Cremark-dir` is passed, and remarks are enabled (`-Cremark=all`), the remarks will be now written to the specified directory, **instead** of being printed to standard error output.  The files are named based on the CGU from which they are being generated.

Currently, the remarks are written using the LLVM streaming machinery, directly in the diagnostics handler. It seemed easier than going back to Rust and then form there back to C++ to use the streamer from the diagnostics handler. But there are many ways to implement this, of course, so I'm open to suggestions :)

I included some comments with questions into the code. Also, I'm not sure how to test this.

r? `@tmiasko`
2023-07-02 12:48:44 +00:00
..
config Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
cgu_reuse_tracker.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
code_stats.rs Tweak the sort of vtable sizes 2023-06-13 12:39:59 +00:00
config.rs Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko 2023-07-02 12:48:44 +00:00
cstore.rs Remove MetadataRef type alias 2023-05-16 11:55:47 +00:00
errors.rs linker: Report linker flavors incompatible with the current target 2023-05-29 19:58:11 +03:00
filesearch.rs bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
lib.rs Collect VTable stats & add -Zprint-vtable-sizes 2023-06-12 15:58:35 +00:00
options.rs Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko 2023-07-02 12:48:44 +00:00
output.rs Write to stdout if - is given as output file 2023-06-06 17:53:29 -04:00
parse.rs Simplify some conditions 2023-06-27 07:40:47 +00:00
search_paths.rs Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
session.rs Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
utils.rs Rollup merge of #109231 - Zoxc:fs-non-canon, r=eholk 2023-03-23 19:55:45 +01:00