[clang] [clang][bytecode] Reapply "Use tailcalls via `[[clang::musttail]]`" (PR #188419)
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 28 10:40:30 PDT 2026
mgorny wrote:
This is breaking building on 32-bit x86, at least with gcc 15:
```
FAILED: [code=1] lib/AST/CMakeFiles/obj.clangAST.dir/ByteCode/Interp.cpp.o
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse -DCLANG_EXPORTS -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_
GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_M
ACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST
-I/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/clang/lib/AST -I/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/clang/include -I
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/include -I/usr/lib/llvm/23/include -O2 -pipe -march=native
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wc
ast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundan
t-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dto
r -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-s
ections -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -std=c++17 -UNDEBUG -MD -MT lib/AST/CMakeFiles/obj.clangAST.dir/ByteC
ode/Interp.cpp.o -MF lib/AST/CMakeFiles/obj.clangAST.dir/ByteCode/Interp.cpp.o.d -o lib/AST/CMakeFiles/obj.clangAST.dir/ByteCode/Interp
.cpp.o -c /var/tmp/portage/llvm-core/clang-23.0.0.9999/work/clang/lib/AST/ByteCode/Interp.cpp
In file included from /var/tmp/portage/llvm-core/clang-23.0.0.9999/work/clang/lib/AST/ByteCode/Interp.cpp:2556:
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc: In function ‘bool clang::interp::Interp
_RetPtr(InterpState&, CodePtr&)’:
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc:44729:29: error: cannot tail-call: target is not able to optimize the call into a sibling call
44729 | MUSTTAIL return Ret<PT_Ptr>(S, PC);
| ~~~~~~~~~~~^~~~~~~
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc: In function ‘bool clang::interp::Interp_RetMemberPtr(InterpState&, CodePtr&)’:
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc:44733:35: error: cannot tail-call: target is not able to optimize the call into a sibling call
44733 | MUSTTAIL return Ret<PT_MemberPtr>(S, PC);
| ~~~~~~~~~~~~~~~~~^~~~~~~
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc: In function ‘bool clang::interp::Interp_RetFixedPoint(InterpState&, CodePtr&)’:
/var/tmp/portage/llvm-core/clang-23.0.0.9999/work/x/y/clang-abi_x86_32.x86/lib/AST/Opcodes.inc:44725:36: error: cannot tail-call: target is not able to optimize the call into a sibling call
44725 | MUSTTAIL return Ret<PT_FixedPoint>(S, PC);
| ~~~~~~~~~~~~~~~~~~^~~~~~~
ninja: build stopped: subcommand failed.
```
https://github.com/llvm/llvm-project/pull/188419
More information about the cfe-commits
mailing list