alexcrichton opened PR #6302 from alexcrichton:shrink-trampolines
to bytecodealliance:main
:
This commit shuffles trampolines to the end of a compiled ELF file instead of interspersed throughout. Additionally trampolines are no longer given a higher alignment requirement than is required by the ISA as is given to functions since they're not perf critical.
The savings here are quite minor, only 0.3% locally on spidermonkey.wasm.
<!--
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 fitzgen for a review on PR #6302.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #6302.
alexcrichton requested wasmtime-core-reviewers for a review on PR #6302.
alexcrichton updated PR #6302.
jameysharp submitted PR review:
Nice, I think this looks good overall. And 0.3% ain't nothing.
I would like to ask for a
struct Alignment
with named fields forminimum
andpreferred
, rather than trying to match up the tuple field order with the name of the function it comes from.
jameysharp created PR review comment:
What would you say to removing this method from the
compiler
trait entirely? If it's only used forappend_func
, which already has analignment
parameter, maybe we should just pass the desired alignment atappend_func
's callers.
jameysharp submitted PR review:
Nice, I think this looks good overall. And 0.3% ain't nothing.
I would like to ask for a
struct Alignment
with named fields forminimum
andpreferred
, rather than trying to match up the tuple field order with the name of the function it comes from.
alexcrichton updated PR #6302.
fitzgen submitted PR review.
jameysharp submitted PR review:
Other than getting very confused in one spot, this looks good to me.
jameysharp submitted PR review:
Other than getting very confused in one spot, this looks good to me.
jameysharp created PR review comment:
I first read this as forcing constants to be aligned to at least the function's minimum alignment, but this
alignment
variable is not used for the constant's alignment. It's just collecting the maximum alignment of any constant or, now, the function's minimum alignment.Is there some way to make that more clear? I think renaming the variable to
function_alignment
would have kept me from being confused, at least.
alexcrichton updated PR #6302.
alexcrichton created PR review comment:
Ah good point!
alexcrichton has enabled auto merge for PR #6302.
alexcrichton merged PR #6302.
Last updated: Nov 22 2024 at 16:03 UTC