rust/compiler/rustc_codegen_llvm/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
..
back Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko 2023-07-02 12:48:44 +00:00
coverageinfo Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
debuginfo Set capacity of the string passed to push_item_name. 2023-06-29 11:46:25 +10:00
llvm Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko 2023-07-02 12:48:44 +00:00
abi.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
allocator.rs use new c literals instead of cstr! macro 2023-05-31 19:40:24 +03:00
asm.rs Rollup merge of #111332 - loongarch-rs:inline-asm, r=Amanieu 2023-05-08 19:41:51 +09:00
attributes.rs Avoid an unnecessary use of SmallStr. 2023-06-29 11:37:12 +10:00
base.rs use new c literals instead of cstr! macro 2023-05-31 19:40:24 +03:00
builder.rs Auto merge of #113116 - nnethercote:codegen-opts, r=oli-obk 2023-06-30 00:35:19 +00:00
callee.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
common.rs Support 128-bit enum variant in debuginfo codegen 2023-06-10 03:39:24 +08:00
consts.rs Rollup merge of #111647 - klensy:cstr, r=oli-obk 2023-06-02 18:12:45 +02:00
context.rs add comment regarding __gxx_wasm_personality_v0 2023-06-07 17:48:33 +02:00
declare.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
errors.rs Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
intrinsic.rs fix comment (review change) 2023-06-07 17:48:33 +02:00
lib.rs Removed use of iteration through a HashMap/HashSet in rustc_incremental and replaced with IndexMap/IndexSet 2023-06-04 21:54:28 -04:00
llvm_util.rs Create a structure to define the features from to_llvm_features. 2023-05-22 14:46:40 +01:00
mono_item.rs Use is_some_and/is_ok_and in less obvious spots 2023-05-24 14:33:43 +00:00
type_.rs add wasm eh intrinsics 2023-06-07 17:46:34 +02:00
type_of.rs Use load-store instead of memcpy for short integer arrays 2023-06-04 00:51:49 -07:00
va_arg.rs Implement va_list and va_arg for s390x FFI 2022-12-19 21:07:57 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00