Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Since #90833 rustc prints remarks with -Cremark to the console.
LLVM can include the remarks into the executable. Then you can read the remarks and analyze them.
https://llvm.org/docs/Remarks.html
I never managed to thread the flags through rustc.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
matthiaskrgr commentedon May 4, 2022
RUSTFLAGS="-C llvm-args=--pass-remarks=.* -Cdebuginfo=2" cargo build --release
does that work for you?
tschuett commentedon May 4, 2022
It still pollutes my console.
tschuett commentedon May 4, 2022
RUSTFLAGS="-C llvm-args=--pass-remarks-output=filename -Cdebuginfo=2" cargo build --releaseThis fails because rustc does not know about: pass-remarks-output
[-]remarks[/-][+]Emit optimization remarks to the final binary, not the console[/+]Rollup merge of rust-lang#111203 - Kobzol:remark-print-kind, r=tmiasko
Rollup merge of rust-lang#111203 - Kobzol:remark-print-kind, r=tmiasko
Rollup merge of rust-lang#111203 - Kobzol:remark-print-kind, r=tmiasko
Kobzol commentedon Jul 6, 2023
With #113040, remarks can now be outputted into a directory, in the same (YAML) format as
clangoutputs them.yugr commentedon Jun 9, 2025
There seems to be something fishy about
-C remark. This codeis clearly vectorized:
and
-C llvm-args=--pass-remarks=.*tells me that (and nothing else):On the other hand
-C remark=alltells me a lot of other things but nothing about vectorization:Moreover trying to ask about Loop Vectorizer also fails:
I'm on