Rework MIR inlining costs by scottmcm · Pull Request #123179 · rust-lang/rust (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@scottmcm

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Mar 28, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 29, 2024

@bors

Rework MIR inlining costs

A bunch of the current costs are surprising, probably accidentally from from not writing out the matches in full. For example, a runtime-length memcpy was treated as the same cost as an Unreachable.

This reworks things around two main ideas:

By including costs for locals and vardebuginfo this makes some things overall more expensive, but because it also greatly reduces the cost for simple things like local variable addition, other things also become less expensive overall.

r? ghost

scottmcm

scottmcm

@scottmcm scottmcm marked this pull request as ready for review

March 29, 2024 03:19

This was referenced

Mar 29, 2024

@scottmcm

A bunch of the current costs are surprising, probably accidentally from from not writing out the matches in full. For example, a runtime-length memcpy was treated as the same cost as an Unreachable.

This reworks things around two main ideas:

By including costs for locals and vardebuginfo this makes some things overall more expensive, but because it also greatly reduces the cost for simple things like local variable addition, other things also become less expensive overall.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 30, 2024

@bors

Rework MIR inlining costs

A bunch of the current costs are surprising, probably accidentally from from not writing out the matches in full. For example, a runtime-length memcpy was treated as the same cost as an Unreachable.

This reworks things around two main ideas:

By including costs for locals and vardebuginfo this makes some things overall more expensive, but because it also greatly reduces the cost for simple things like local variable addition, other things also become less expensive overall.

r? ghost

@rustbot rustbot added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Apr 23, 2024