compiler-rt: memmove optimisation #22606
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR seeks to improve
memmove
performance and fix some issues with generated code size of the current compiler-rtmemmove
.I haven't yet benchmarked this implementation, though I expect the impact to be similar to #18912.
Here is a table of code sizes for
ReleastFast
(targets chosen somewhat randomly, feel free to suggest additions/removals from the list):thumb-freestanding-eabihf
cortex_m3
thumb-freestanding-eabihf
cortex_m4
thumb-freestanding-eabihf
cortex_m33
thumb-freestanding-eabihf
cortex_m52
aarch64-linux
cortex_a53
aarch64-linux
cortex_a75
aarch64-linux
cortex_x1
aarch64-linux
cortex_x4
x86_64-linux
x86_64
x86_64-linux
x86_64_v2
x86_64-linux
x86_64_v3
x86_64-linux
x86_64_v4
loognarch64-linux
loongarch64
I've marked this a ready for review as I'm not sure when I'll get to benchmarking in earnest and I think this should be merged before 0.14. I think there's no problem merging this as-is (modulo any reviews) and doing the following todos in a follow-up post 0.14 if I don't get it done before hand.
Resolves #22603 (at least for the target discussed there, but presumably for any others as well).
Todo:
memcpy