You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jfecher I've got a branch which addresses this by adding an instruction cache to the constant_folding pass. I think that fits quite well into this pass, but would you prefer this to be performed as a separate pass?
Problem
Consider the program below
This program is satisfied for all values of
x
so we expect zero constraints to be generated. However, this currently compiles to the SSAv5
andv6
are obviously equal but the compiler doesn't take this into account to simplify the rest of the circuit.Happy Case
We should have an SSA pass which for each block, checks that for each instruction:
If both of these are true then we can drop the instruction and just replace its results with the results of the earlier instruction.
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
The text was updated successfully, but these errors were encountered: