Commit 284860b
Thread no_recursion through compile_program for the FFI
`Compiler::compile_program()` was the only `LLVMJIT::new()` site that
forgot to copy `self.no_recursion` onto the JIT before calling
`compile_only`, so the call-depth prologue/epilogue was still emitted
on every function regardless of the compiler-level flag.
That codepath is what `lyte_compiler_compile` calls, which is the only
LLVM entry the xcframework uses, so flipping the FFI default to
`no_recursion = true` in 2df4d9d had no effect on the actual LLVM
backend — Audulus DSP code was still paying the full ~2x reverb
regression documented in docs/LLVM_CALL_DEPTH_REGRESSION.md. The CLI
(`run_llvm` / `print_llvm_ir`) was unaffected because those sites do
thread the flag, which is why the bug was invisible to CLI smoke tests.
Verified end-to-end with a C harness against `liblyte.dylib` driving
`lyte_compiler_compile` on the regressed reverb script: 10000 process()
calls drop from ~0.43s to ~0.21s once the line is added.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d5a634a commit 284860b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| 881 | + | |
881 | 882 | | |
882 | 883 | | |
883 | 884 | | |
| |||
0 commit comments