alexcrichton requested abrown for a review on PR #10811.
alexcrichton opened PR #10811 from alexcrichton:shrink-some-generated-code to bytecodealliance:main:
This is a few minor changes in the hopes of optimizing the compile-time of the generated code itself for the x64 assembler crate, including:
- Add
derive(Copy)to all instructions to benefit from a specialized implementation ofderive(Clone)when aCopyimplementation is also present (e.g. it's*fooinstead of a structuralclone-each-field).- Don't use
write!inDisplay for Instand instead delegate directly with methods to avoid formatting machinery.- Use helper methods in
RegisterVisitortrait to have register allocation be a method-per-operand and shrink the methods a bit.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10811.
alexcrichton commented on PR #10811:
This doesn't have a big impact on compile-time right now, nor am I confident that it'll have an impact long-term, so @abrown if you'd prefer I'm also ok to just close this and/or drop parts of it.
abrown submitted PR review:
Makes sense to me. My sense is that, with all this generated code, any clarity improvements are worth their weight in gold due to easier debugging, regardless of the performance improvement.
alexcrichton updated PR #10811.
alexcrichton has enabled auto merge for PR #10811.
alexcrichton merged PR #10811.
Last updated: Dec 06 2025 at 07:03 UTC