diff --git a/docs/content/docs/cli.mdx b/docs/content/docs/cli.mdx index 8b0353620..9fa5e9447 100644 --- a/docs/content/docs/cli.mdx +++ b/docs/content/docs/cli.mdx @@ -135,6 +135,9 @@ With `--sparse`, the profile leaves out the functions the runs never reached. Th
--detached-exitprocess.exit(), hand the release of its memory to a helper process so the parent sees the exit sooner. The kernel otherwise frees the whole address space before the exit is reported, which takes tens of milliseconds per gigabyte. Opt in only where the trade-offs are acceptable: for up to about 100 ms after the exit, the helper keeps the executable mapped (overwriting the binary in place fails with "text file busy"), its memory stays charged to the cgroup, and the teardown CPU time no longer appears in the parent's resource usage. Valid only for executable builds; it has no effect on other platforms.--target-cpu <baseline|x86-64-v2|x86-64-v3|x86-64-v4|native>baseline, runs on any x86-64 CPU. A higher level lets LLVM use more instructions, and the executable then runs only on CPUs that support that level. native uses the highest level the build machine supports. Valid for executable, assembly, and object output on x86-64 targets. See Target CPU.--profile-generate <pattern>%p expands to the process ID; the LLVM_PROFILE_FILE environment variable overrides the pattern at run time. A relative pattern resolves from the current working directory. Instrumented programs run slower. Valid only for executable builds with --optimization=release or speed.| Level | +Adds | +
|---|---|
x86-64-v2 |
+ SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT | +
x86-64-v3 |
+ AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE | +
x86-64-v4 |
+ AVX-512 (F, BW, CD, DQ, VL) | +
--emit=llvm to inspect the generated code.
diff --git a/docs/content/docs/how-it-works.mdx b/docs/content/docs/how-it-works.mdx
index f1b64948d..e017267d7 100644
--- a/docs/content/docs/how-it-works.mdx
+++ b/docs/content/docs/how-it-works.mdx
@@ -42,17 +42,16 @@ Parsing, type checking, lowering, and LLVM IR generation run one after another o
### Partitions
-The LLVM helper divides an executable's LLVM IR into partitions by its size: one partition per 4 MiB of LLVM text, rounded up to a power of two, and at most 64. `--emit=llvm` writes this text, so its file size shows how many partitions a program gets.
+The LLVM helper divides an executable's LLVM IR into partitions by its size. Up to 1 MiB of LLVM text is one partition, and up to 2 MiB is four. Larger programs get one partition per 4 MiB of LLVM text, rounded up to a power of two, and at least 8 and at most 64. `--emit=llvm` writes this text, so its file size shows how many partitions a program gets.
| LLVM text | Partitions |
|---|---|
| Up to 4 MiB | 1 |
| Over 4 MiB, up to 8 MiB | 2 |
| Over 8 MiB, up to 16 MiB | 4 |
| Over 16 MiB, up to 32 MiB | 8 |
| Up to 1 MiB | 1 |
| Over 1 MiB, up to 2 MiB | 4 |
| Over 2 MiB, up to 32 MiB | 8 |
| Over 32 MiB, up to 64 MiB | 16 |
| Over 64 MiB, up to 128 MiB | 32 |
| Over 128 MiB | 64 |