Skip to content

Commit db34304

Browse files
committed
sembr src/profiling.md
1 parent b09511c commit db34304

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/profiling.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ Since most of the time compiling rustc is spent in LLVM, the idea is that by
3333
reducing the amount of code passed to LLVM, compiling rustc gets faster.
3434

3535
To use `cargo-llvm-lines` together with somewhat custom rustc build process, you can use
36-
`-C save-temps` to obtain required LLVM IR. The option preserves temporary work products
37-
created during compilation. Among those is LLVM IR that represents an input to the
38-
optimization pipeline; ideal for our purposes. It is stored in files with `*.no-opt.bc`
39-
extension in LLVM bitcode format.
36+
`-C save-temps` to obtain required LLVM IR.
37+
The option preserves temporary work products created during compilation.
38+
Among those is LLVM IR that represents an input to the
39+
optimization pipeline; ideal for our purposes.
40+
It is stored in files with `*.no-opt.bc` extension in LLVM bitcode format.
4041

4142
Example usage:
4243
```
@@ -105,7 +106,8 @@ rust.codegen-units = 0 # num_cpus
105106
The llvm-lines output is affected by several options.
106107
`rust.optimize = false` increases it from 2.1GB to 3.5GB and `codegen-units = 0` to 4.1GB.
107108

108-
MIR optimizations have little impact. Compared to the default `RUSTFLAGS="-Z
109+
MIR optimizations have little impact.
110+
Compared to the default `RUSTFLAGS="-Z
109111
mir-opt-level=1"`, level 0 adds 0.3GB and level 2 removes 0.2GB.
110112
As of <!-- date-check --> July 2022,
111113
inlining happens in LLVM and GCC codegen backends,

0 commit comments

Comments
 (0)