Skip to content

Change Pass::Run to take Program by value#100

Merged
1ntEgr8 merged 1 commit intomainfrom
users/elton/pass-run-by-value
Feb 27, 2026
Merged

Change Pass::Run to take Program by value#100
1ntEgr8 merged 1 commit intomainfrom
users/elton/pass-run-by-value

Conversation

@1ntEgr8
Copy link
Copy Markdown
Collaborator

@1ntEgr8 1ntEgr8 commented Feb 27, 2026

Summary

  • Change Pass::Run signature to take Program by value instead of const reference
  • Enables move semantics through the pass pipeline, avoiding unnecessary copies
  • Update PassManager, ShortestPathRouting, and tests accordingly

@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from fa6c1f6 to 80a1fa0 Compare February 27, 2026 02:34
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from c35d43b to fefa490 Compare February 27, 2026 02:34
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from 80a1fa0 to bd8191c Compare February 27, 2026 15:20
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from fefa490 to 7d5a2d3 Compare February 27, 2026 15:20
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from bd8191c to f61e849 Compare February 27, 2026 15:21
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 7d5a2d3 to c3574bc Compare February 27, 2026 15:21
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from f61e849 to c75521d Compare February 27, 2026 15:26
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from c3574bc to 89357f1 Compare February 27, 2026 15:26
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from c75521d to 31ad691 Compare February 27, 2026 15:49
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 89357f1 to 1d6a072 Compare February 27, 2026 15:49
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from 31ad691 to 2a6923b Compare February 27, 2026 15:55
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 1d6a072 to 40c37ee Compare February 27, 2026 15:55
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from 2a6923b to bdaf7d6 Compare February 27, 2026 15:57
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 40c37ee to 6db5447 Compare February 27, 2026 15:57
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from bdaf7d6 to 2a6923b Compare February 27, 2026 16:00
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 6db5447 to 40c37ee Compare February 27, 2026 16:00
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from 2a6923b to 4f19fbd Compare February 27, 2026 16:01
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 40c37ee to ab3f95b Compare February 27, 2026 16:03
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from 4f19fbd to e635649 Compare February 27, 2026 16:19
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from ab3f95b to 93f6338 Compare February 27, 2026 16:19
@1ntEgr8 1ntEgr8 force-pushed the users/elton/client-free-shards branch from e635649 to 8e8dddb Compare February 27, 2026 17:26
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 93f6338 to 3ff07eb Compare February 27, 2026 17:26
Base automatically changed from users/elton/client-free-shards to main February 27, 2026 17:27
Program is a move-only type, so passing by value enables callers to
transfer ownership via std::move and allows passes to return early
without cloning (e.g. the null-topology fast path just returns the
input directly).

Update PassManager to std::move programs between passes and adjust
test fixtures to use factory lambdas for repeated program creation.
@1ntEgr8 1ntEgr8 force-pushed the users/elton/pass-run-by-value branch from 3ff07eb to 87d1e39 Compare February 27, 2026 17:27
@1ntEgr8 1ntEgr8 merged commit 0833775 into main Feb 27, 2026
6 of 7 checks passed
@1ntEgr8 1ntEgr8 deleted the users/elton/pass-run-by-value branch February 27, 2026 17:31
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.

1 participant