about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/messages.ftl
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-05-06 23:32:02 +0200
committerGitHub <noreply@github.com>2023-05-06 23:32:02 +0200
commite4eaf319c1d87eaaca70b608f850110e7f607ad1 (patch)
treea309b3c90733348a19809b883a25f1c0dca0e0d1 /compiler/rustc_codegen_llvm/messages.ftl
parent60db4487904a1c8ed6a99343c648c0fbda2447b6 (diff)
parent00ac29d7b2e7a9a2da79f8754efc8e0d51e81886 (diff)
downloadrust-e4eaf319c1d87eaaca70b608f850110e7f607ad1.tar.gz
rust-e4eaf319c1d87eaaca70b608f850110e7f607ad1.zip
Rollup merge of #111203 - Kobzol:remark-print-kind, r=tmiasko
Output LLVM optimization remark kind in `-Cremark` output

Since https://github.com/rust-lang/rust/pull/90833, the optimization remark kind has not been printed. Therefore it wasn't possible to easily determine from the log (in a programmatic way) which remark kind was produced. I think that the most interesting remarks are the missed ones, which can lead users to some code optimization.

Maybe we could also change the format closer to the "old" one:
```
note: optimization remark for tailcallelim at /checkout/src/libcore/num/mod.rs:1:0: marked this call a tail call candidate
```

I wanted to programatically parse the remarks so that they could work e.g. with https://github.com/OfekShilon/optview2. However, now that I think about it, probably the proper solution is to tell rustc to output them to YAML and then use the YAML as input for the opt remark visualization tools. The flag for enabling this does not seem to work though (https://github.com/rust-lang/rust/issues/96705#issuecomment-1117632322).

Still I think that it's good to output the remark kind anyway, it's an important piece of information.

r? ```@tmiasko```
Diffstat (limited to 'compiler/rustc_codegen_llvm/messages.ftl')
-rw-r--r--compiler/rustc_codegen_llvm/messages.ftl2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/messages.ftl b/compiler/rustc_codegen_llvm/messages.ftl
index 2e3adc08669..d77634741fb 100644
--- a/compiler/rustc_codegen_llvm/messages.ftl
+++ b/compiler/rustc_codegen_llvm/messages.ftl
@@ -82,7 +82,7 @@ codegen_llvm_prepare_thin_lto_module_with_llvm_err = failed to prepare thin LTO
 codegen_llvm_parse_bitcode = failed to parse bitcode for LTO module
 codegen_llvm_parse_bitcode_with_llvm_err = failed to parse bitcode for LTO module: {$llvm_err}
 
-codegen_llvm_from_llvm_optimization_diag = {$filename}:{$line}:{$column} {$pass_name}: {$message}
+codegen_llvm_from_llvm_optimization_diag = {$filename}:{$line}:{$column} {$pass_name} ({$kind}): {$message}
 codegen_llvm_from_llvm_diag = {$message}
 
 codegen_llvm_write_bytecode = failed to write bytecode to {$path}: {$err}