Skip to content

Conversation

scottmcm
Copy link
Member

@scottmcm scottmcm commented Dec 2, 2017

The HIR->MIR build likes introducing these when you use local variables, and they can be cheaply and safely simplified. The pass only runs when the two lines in the peephole have the same span and the local is a non-user variable, so it can be run even with full debug info requested.

The HIR->MIR build likes introducing these when you use local variables, and they can be cheaply and safely simplified.
@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member

eddyb commented Dec 2, 2017

Initial reaction is I'm not sure we want this (as opposed to debuginfo-awareness in more general value/destination propagation).

@scottmcm
Copy link
Member Author

scottmcm commented Dec 2, 2017

Closing after IRC discussion, as eddyb's figured out how to make full NRVO sound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants