Skip to content

Commit c6bfe28

Browse files
committed
Be more specific with -C inline-threshold.
1 parent bd70c03 commit c6bfe28

File tree

1 file changed

+14
-6
lines changed
  • src/doc/rustc/src/codegen-options

1 file changed

+14
-6
lines changed

src/doc/rustc/src/codegen-options/index.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,20 @@ If not specified, debug assertions are automatically enabled only if the
297297

298298
## inline-threshold
299299

300-
This option lets you set the threshold for inlining a function. It takes a
301-
positive integer as a value. Inlining is based on a cost model, where a higher
302-
threshold will allow more inlining.
303-
304-
The default depends on the [opt-level](#opt-level). Current values are between
305-
25 to 275.
300+
This option lets you set the default threshold for inlining a function. It
301+
takes an unsigned integer as a value. Inlining is based on a cost model, where
302+
a higher threshold will allow more inlining.
303+
304+
The default depends on the [opt-level](#opt-level):
305+
306+
| opt-level | Threshold |
307+
|-----------|-----------|
308+
| 0 | N/A, only inlines always-inline functions |
309+
| 1 | N/A, only inlines always-inline functions and LLVM lifetime intrinsics |
310+
| 2 | 225 |
311+
| 3 | 275 |
312+
| s | 75 |
313+
| z | 25 |
306314

307315
## panic
308316

0 commit comments

Comments
 (0)