Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use std::move in WithFields #10009

Merged
merged 2 commits into from
Jan 21, 2022

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