Skip to content

Conversation

@electriclilies
Copy link
Contributor

std::move usually does nothing to improve perf, and I noticed a few places where std::move was causing a potential use-after-free. I suspect that some of these might have been contributing to some of the flaky seg faults we've been seeing recently. We'll see what happens when it goes thru CI.

Copy link
Contributor

@tkonolige tkonolige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @electriclilies. I think these std::moves had basically no impact on performance too. This makes the code simpler and we don't have to worry about accidentally using something that was moved.

@AndrewZhaoLuo AndrewZhaoLuo merged commit 11a84c1 into apache:main Jan 21, 2022
@electriclilies
Copy link
Contributor Author

Thanks @AndrewZhaoLuo!

yuanfz98 pushed a commit to yuanfz98/tvm that referenced this pull request Jan 24, 2022
* Don't use std::move in WithFields

* lint
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
* Don't use std::move in WithFields

* lint
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