-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Test, benchmark and remove local_copy_prop_prememcpy
in memcpyopt.rs
#4600
Comments
When I worked on #4592, without |
@IGI-111 I experiemented with removing My suggestion is to still go ahead removing that optimization pass (because it is badly written, at that time for an immediate urgent need). We can have another tracker issue to catch what patterns of memory copy propagation we're missing and try to incorporate that into the current pass (i.e., the one added in #4592). Impact of removing `local_copy_prop_prememcpy`
|
Perhaps it would make sense to run benchmarks on the projects from https://github.com/FuelLabs/sway-applications, instead of the Sway test suite? |
Ah yes. Let me do that. |
I gave this a try, but I have trouble building most of the contracts on my local |
The optimization pass was written during the IR refactor of IR explicit pointer refactor. #4336, and uses an ad-hoc algorithm. A much more systematic (data-flow based, but not a fully data-flow analysis) algorithm was later implemented in Improve copy-propagation and DCE for memory operations #4592. But that does not seem to cover everything that the ad-hoc algorithm did. This needs to be investigated and the function then removed, ensuring correctness and no penalty in generated code sizes.
The algorithm implemented in Improve copy-propagation and DCE for memory operations #4592, to optimize a sequence of
memcpy
s, does so by optimizing pairs in a loop. This is inefficient, and can probably be done in one go.The text was updated successfully, but these errors were encountered: