-
Notifications
You must be signed in to change notification settings - Fork 387
Improve generated Rust code #875
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
Conversation
e9dcb08 to
a9b4b7c
Compare
|
Thanks. You'll have to check:
|
a9b4b7c to
3a03cf5
Compare
|
Last changes includes :
I'll try to make impulse tests work. |
3a03cf5 to
62319d2
Compare
|
Thanks. Tests are OK in solar mode. But |
|
Please don't put |
|
Recompiling current version, I get: |
c138bfc to
a8f5a05
Compare
|
many tests in |
a8f5a05 to
7722881
Compare
|
The issue with the main loop epilogue has been fixed, though the solution is not very elegant. Failing tests with
Because of an unknown error in codegen : Additional failing tests with
Because of an incorrect struct variable access : I'll try to fix those asap. Also @bluenote10, I investigated a bit about the impact of |
7722881 to
badc9da
Compare
- Intermediate cast to an integer when casting a bool to a float - Correctly generate slice type - Remove usage of libm - Simplify boolean conditions - Rust vector backend - Do not use address offsets when accessing buffers (`gRemoveVarAddress`) - Zero-initialize stack arrays - No `()` for single term expressions - Render ForLoopInst as for ranges - Fix incorrect assertion in the `DeclareVarInst` visitor in `struct_manager.hh` - Fix inconsistent formatting in various files
Reverted some of the original changes with parentheses
Use DeclareBufferIterator and IteratorForLoopInst instead, which handle mut lifetimes better. Add rust vec tests. All tests are passing (with -vs 4), except : - constant - delays - pitch_shifter - thru_zero_flanger - zita_rev1 Current code is failing with -vs 32 because of a problem with the main loop epilogue
badc9da to
ebf682d
Compare
|
Cleanup and merged, thanks! |
The default should have been "on" though, not "off". Defaulting to not using it is unfortunate, because one starts to depend on the non-determinism introduced by field re-ordering, which can vary with the Rust version. We should default to something that is deterministic instead, and most likely is more performant. People may not be aware that this issue (and the switch) exists and scratch their heads for a long time like I did when running into this non-deterministic behavior. |
|
Do you mean having |
|
Yes I think so. I haven't read the code in detail, but guess this is where the value comes from if not defined. And the command line switch would then have disabling semantics to explicitly turn it off, i.e., something like |
|
@bluenote10 or @Gui-Yom can you possibly prepare a PR ? |
|
@Gui-Yom did you benchmarked the code with that uses the -vec option? |
gRemoveVarAddress)()for single term expressionsDeclareVarInstvisitor instruct_manager.hh