-
Notifications
You must be signed in to change notification settings - Fork 39
Implement compilation to new SBPIR with multiple machines #288
Implement compilation to new SBPIR with multiple machines #288
Conversation
…ltiple-machines-to-new-sbpir
So, I didn't think how was this going to interact with the DSL, so I didn't tell you about. If you have a doubt you can ask me before. The current dsl is going to be deprecated, for a rust DSL that can read fragments of chiquito source code. Hence, the best option for this is that the new compiler doesn't use the DSL. Manipulate the SBPIR structure directly, even if it is more code in the compiler. If it makes sense some mutable methods could be added to the SBPIR if necessary. |
Could we spec it out a bit more? I understand this as removing any "dsl" imports from the new compiler and implementing it without them, is this correct? |
@alxkzmn yes the new compiler should not depend on this DSL, that is using as an API more than as a DSL. We should implement in the compiler what we require from the DSL. The legacy compiler was easier to implement with the DSL, but it is not the best way to go |
Here are the updated specs: ScopeThe scope of the changes is the refactoring of the way the compiler creates a new SBPIR. Specifically, removing any code that depends on the Implementation
|
Yes. So, to give you some context we built the DSL with lambdas and So, if you think it is too much facilities that are useful from the DSL, you could transfer it to a SBPIRBuilder (and perhaps a series of other "builder" structs), where the API is normal and not based on lambdas and Do you think we need this? |
I think I may borrow some code that is useful but I agree that we don't need a "lambda" anymore and generally don't need the APi-like syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me, but it is better to wait on @leolara
Looks pretty clean, great work!
@alxkzmn some tests that are in legacy are not in the new compiler. A part from that approved |
These changes do not touch the interpreter. The legacy code was already returning separate machine setups in case of multiple machines, so the changes take advantage of that. The files with
_legacy
suffix contain unchanged legacy code.