Commit d8382ab
committed
Adopt preserve_none attribute for MUST_TAIL optimization
Despite using __attribute__((musttail)), the compiler may still emit
full stack frames and spill callee-saved registers in complex handlers
(e.g., do_lw), undermining the benefits of the threaded interpreter.
Integrate Clang's __attribute__((preserve_none)) (available since
Clang 19.1.0) into the MUST_TAIL macro. This attribute modifies the
calling convention to avoid preserving registers, thereby minimizing
stack setup and register pressure during instruction dispatch.
This ensures more consistent tail call optimization and reduces overhead
in the interpreter loop.
Closes: #6011 parent 0358490 commit d8382ab
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
194 | 197 | | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| |||
0 commit comments