diff options
| author | Eric Huss <eric@huss.org> | 2019-10-26 09:05:06 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2019-10-26 09:06:34 -0700 |
| commit | c6bfe28b9563dc6d4d03f4d632048b6b6ae76317 (patch) | |
| tree | f2cf48048da026bad0e73dcadc6c83e240d0c00f /src/doc/rustc | |
| parent | bd70c032273b873a0318636aea8f7a5b22b60e31 (diff) | |
| download | rust-c6bfe28b9563dc6d4d03f4d632048b6b6ae76317.tar.gz rust-c6bfe28b9563dc6d4d03f4d632048b6b6ae76317.zip | |
Be more specific with -C inline-threshold.
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/codegen-options/index.md | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md index a35a14c8abc..686313ea3d0 100644 --- a/src/doc/rustc/src/codegen-options/index.md +++ b/src/doc/rustc/src/codegen-options/index.md @@ -297,12 +297,20 @@ If not specified, debug assertions are automatically enabled only if the ## inline-threshold -This option lets you set the threshold for inlining a function. It takes a -positive integer as a value. Inlining is based on a cost model, where a higher -threshold will allow more inlining. - -The default depends on the [opt-level](#opt-level). Current values are between -25 to 275. +This option lets you set the default threshold for inlining a function. It +takes an unsigned integer as a value. Inlining is based on a cost model, where +a higher threshold will allow more inlining. + +The default depends on the [opt-level](#opt-level): + +| opt-level | Threshold | +|-----------|-----------| +| 0 | N/A, only inlines always-inline functions | +| 1 | N/A, only inlines always-inline functions and LLVM lifetime intrinsics | +| 2 | 225 | +| 3 | 275 | +| s | 75 | +| z | 25 | ## panic |
