Skip to content

Commit 29151c8

Browse files
Add documentation for LLVM IR
1 parent 7940e85 commit 29151c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

collector/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,14 @@ The mandatory `<PROFILER>` argument must be one of the following.
356356
- **Output**. Human-readable output is written to files with an `ll` prefix.
357357
- **Notes**. Does not work with the `Check` build kind. Also does not work
358358
with the `IncrFull`, `IncrUnchanged`, and `IncrPatched` run kinds.
359+
- `llvm-ir`: Dump rustc-generated LLVM IR (before any LLVM passes)
360+
- Purpose. This command provides access to the raw LLVM IR rustc produces,
361+
which can be used for targeted improvements to functions (e.g., those
362+
that get monomorphized a lot) and optimization of rustc IR emission in
363+
general.
364+
- Slowdown. Likely runs faster than regular builds due to skipping most of
365+
the LLVM work.
366+
- Output. Produces `llir` prefixed files, in LLVM IR textual format.
359367
- `mono-items`: Dump monomorphization items for each (merged) CGU in the crate.
360368
These are also post-processed from the raw format into per-file dumps.
361369
- **Purpose**. This is useful to investigate changes in CGU partionining.

0 commit comments

Comments
 (0)