Skip to content

Commit

Permalink
Be more specific with -C inline-threshold.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Oct 26, 2019
1 parent bd70c03 commit c6bfe28
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/doc/rustc/src/codegen-options/index.md
Expand Up @@ -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

Expand Down

0 comments on commit c6bfe28

Please sign in to comment.