cranelift: Emit argument location uses eagerly in gen_arg#8398
cranelift: Emit argument location uses eagerly in gen_arg#8398jameysharp merged 1 commit intobytecodealliance:mainfrom
Conversation
This reverts the key parts of e3a08d4 (bytecodealliance#8151), because it turns out that we didn't need that abstraction. Several changes in the last month have enabled this: - bytecodealliance#8292 and then bytecodealliance#8316 allow us to refer to either incoming or outgoing argument areas in a (mostly) consistent way - bytecodealliance#8327, bytecodealliance#8377, and bytecodealliance#8383 demonstrate that we never need to delay writing stack arguments directly to their final location prtest:full
14359a8 to
2d33eea
Compare
elliottt
left a comment
There was a problem hiding this comment.
Awesome! Now that I'm thinking about it, I believe we added this specifically for GrowArgumentArea and ShrinkArgumentArea, both of which no longer exist 🎉
|
Of the several variations on the theme that we've considered, this one was even earlier than the grow/shrink frame approach. We intended to use regalloc2's parallel move resolver to shuffle values between stack slots, registers, and the argument area, to capture all the work of restoring clobber-saves, putting arguments in the right places, and getting the return address in the right place too. That turned out to be complicated. Fortunately, the fact that Ulrich's suggestion (proactively resizing the argument area) works shows we will never have to do parallel moves. |
This reverts the key parts of e3a08d4 (#8151), because it turns out that we didn't need that abstraction.
Several changes in the last month have enabled this:
cranelift: Specialize StackAMode::FPOffset #8292 and then cranelift: Simplify StackAMode variants #8316 allow us to refer to either incoming or outgoing argument areas in a (mostly) consistent way
Eagerly reserve tail call stack arg space #8327, Avoid copying the frame for tail calls on aarch64 #8377, and Avoid copying the frame for tail calls on riscv64 #8383 demonstrate that we never need to delay writing stack arguments directly to their final location