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

chore: perform dead instruction elimination through std::as_witness #5123

Merged
merged 5 commits into from
May 28, 2024

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

This PR adds handling for std::as_witness in dead instruction elimination. i.e. if we're asking for an SSA value to be assigned to a witness when that value would not otherwise be represented in the ACIR then we can remove it.

This issue can be seen in #5122 where making two calls to the same function with the same inputs and asserting that the outputs are the same results in constraints whereas this can be determined at runtime.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench requested a review from vezenovm May 28, 2024 14:39
@TomAFrench TomAFrench added this pull request to the merge queue May 28, 2024
Merged via the queue into master with commit b359bac May 28, 2024
44 checks passed
@TomAFrench TomAFrench deleted the tf/as-witness-die branch May 28, 2024 15:04
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request May 28, 2024
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request May 28, 2024
…ir#5109)

feat: Sync from aztec-packages (noir-lang/noir#5125)
chore: remove warnings field from `DebugArtifact` (noir-lang/noir#5118)
feat: make ACVM generic across fields (noir-lang/noir#5114)
fix: Auto dereference trait methods in the elaborator (noir-lang/noir#5124)
chore: perform dead instruction elimination through `std::as_witness` (noir-lang/noir#5123)
TomAFrench added a commit to AztecProtocol/aztec-packages that referenced this pull request May 28, 2024
Automated pull of development from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: deduplicate `ReturnConstant` warning
(noir-lang/noir#5109)
feat: Sync from aztec-packages
(noir-lang/noir#5125)
chore: remove warnings field from `DebugArtifact`
(noir-lang/noir#5118)
feat: make ACVM generic across fields
(noir-lang/noir#5114)
fix: Auto dereference trait methods in the elaborator
(noir-lang/noir#5124)
chore: perform dead instruction elimination through `std::as_witness`
(noir-lang/noir#5123)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <tom@tomfren.ch>
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.

None yet

2 participants