Skip to content

Replace uses of codet::move by codet::add(std::move(...)) [blocks: #2310] #3278

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

Merged
merged 3 commits into from
Nov 7, 2018

Conversation

tautschnig
Copy link
Collaborator

This uses the new rvalue interface and enables removal of codet::move.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Nov 5, 2018
@tautschnig
Copy link
Collaborator Author

This will require #3277 to be merged first.

This uses the new rvalue interface and prepares removal of codet::move.
This simplifies the code structure and ensures RAII where possible.
With the preceding changes it is no longer being used.
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

🚫
This PR failed Diffblue compatibility checks (cbmc commit: a7cff47).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90497423
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

@tautschnig
Copy link
Collaborator Author

@peterschrammel @thk123 @allredj I would guess that the TG failure is genuine with some use of .move. Assuming that is the case, could someone patch TG to use .add(std::move(...)) instead? This can be done immediately, there is no need for this PR to be merged for that to work.

@tautschnig tautschnig changed the title Replace uses of codet::move by codet::add(std::move(...)) Replace uses of codet::move by codet::add(std::move(...)) [blocks: #2310] Nov 7, 2018
@kroening
Copy link
Member

kroening commented Nov 7, 2018

In terms of performance, my suspicion is that the std::move provides no benefit -- i.e., just codet::add() would likely be fine.

@kroening kroening removed their assignment Nov 7, 2018
@tautschnig
Copy link
Collaborator Author

In terms of performance, my suspicion is that the std::move provides no benefit -- i.e., just codet::add() would likely be fine.

I guess in most cases that is true, but #3067 had a discussion of possible copy-on-write breaks that could occur in some scenarios. I have admittedly not done a detailed review of the scenarios but rather went for a naive move -> add(std::move(...)) transformation.

@kroening
Copy link
Member

kroening commented Nov 7, 2018

I did look for these, and didn't spot any.

@tautschnig
Copy link
Collaborator Author

I'll add an independent review of all uses of std::move to my list. Unless pushed, I'd leave this PR as-is, but several of the std::move might go away in that subsequent review.

@kroening kroening merged commit d4d00ab into diffblue:develop Nov 7, 2018
@tautschnig tautschnig deleted the no-codet-move branch November 7, 2018 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants