Skip to content

[Windows] allow clang to build tailcall vm, use __preserve_none for Call VM if available with msvc#21563

Draft
henderkes wants to merge 2 commits intophp:masterfrom
henderkes:8.5.4
Draft

[Windows] allow clang to build tailcall vm, use __preserve_none for Call VM if available with msvc#21563
henderkes wants to merge 2 commits intophp:masterfrom
henderkes:8.5.4

Conversation

@henderkes
Copy link
Copy Markdown
Contributor

@henderkes henderkes commented Mar 28, 2026

Not the largest improvement (~5-8% in my testing), but msvc's __preserve_none is not stable enough to use the tailcall vm with [[msvc::musttail]].

The tailcall VM for clang is a nice 25-30% improvement, but it still lags far behind msvc.

I'm not 100% sure if switching the call vm to __preserve_none could have any ill effects - Edit: forgot about the JIT... will take a while to track that down. If it's even feasible, I've never looked at the jit code.

PS: removing /GUARD:CF (from PHP_SECURITY_FLAGS) gives a 40% performance uplift in phoronix phpbench. I'm guessing disabling that isn't a good idea?

@henderkes henderkes requested a review from dstogov as a code owner March 28, 2026 13:57
@henderkes henderkes changed the title allow clang to build tailcall vm on windows, use __preserve_none for Call VM if available [Windows] allow clang to build tailcall vm, use __preserve_none for Call VM if available with msvc Mar 28, 2026
@henderkes henderkes force-pushed the 8.5.4 branch 3 times, most recently from 8d8808b to 774082c Compare March 28, 2026 15:50
@henderkes henderkes marked this pull request as draft March 28, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant