[clang] 40f0b31 - [clang][bytecode] Disable tail calls on MSVC and PPC (#188033)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 06:56:14 PDT 2026
Author: Timm Baeder
Date: 2026-03-23T14:56:09+01:00
New Revision: 40f0b312e3b7ab48fbd91360d892cc28e4baba6b
URL: https://github.com/llvm/llvm-project/commit/40f0b312e3b7ab48fbd91360d892cc28e4baba6b
DIFF: https://github.com/llvm/llvm-project/commit/40f0b312e3b7ab48fbd91360d892cc28e4baba6b.diff
LOG: [clang][bytecode] Disable tail calls on MSVC and PPC (#188033)
Disable tail calls on MSVC and PPC.
Added:
Modified:
clang/lib/AST/ByteCode/Interp.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 6e7a60d5e4332..fc783fe4ec871 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -37,7 +37,10 @@ using namespace clang::interp;
#endif
// On MSVC, musttail does not guarantee tail calls in debug mode.
-#if (defined(_MSC_VER) && defined(_DEBUG)) || !defined(MUSTTAIL)
+// We disable it on MSVC generally since it doesn't seem to be able
+// to handle the way we use tailcalls.
+// PPC can't tail-call external calls, which is a problem for InterpNext.
+#if defined(_MSC_VER) || defined(_ARCH_PPC) || !defined(MUSTTAIL)
#define MUSTTAIL
#define USE_TAILCALLS 0
#else
More information about the cfe-commits
mailing list