Timm =?utf-8?q?Bäder?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


https://github.com/tbaederr updated 
https://github.com/llvm/llvm-project/pull/188033

>From ab29e63de328c7aee47c197a1c9190829e63a74b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Mon, 23 Mar 2026 14:05:29 +0100
Subject: [PATCH 1/2] [clang][bytecode] Disable tail calls on MSVC

---
 clang/lib/AST/ByteCode/Interp.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/Interp.cpp 
b/clang/lib/AST/ByteCode/Interp.cpp
index 6e7a60d5e4332..abe7b31082302 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -37,7 +37,9 @@ 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.
+#if defined(_MSC_VER) || !defined(MUSTTAIL)
 #define MUSTTAIL
 #define USE_TAILCALLS 0
 #else

>From 0e37ed1c42c612d1b18c5b815bd7be6f81b0ba1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Mon, 23 Mar 2026 14:32:06 +0100
Subject: [PATCH 2/2] Also PPC.

---
 clang/lib/AST/ByteCode/Interp.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/Interp.cpp 
b/clang/lib/AST/ByteCode/Interp.cpp
index abe7b31082302..fc783fe4ec871 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -39,7 +39,8 @@ using namespace clang::interp;
 // On MSVC, musttail does not guarantee tail calls in debug mode.
 // We disable it on MSVC generally since it doesn't seem to be able
 // to handle the way we use tailcalls.
-#if defined(_MSC_VER) || !defined(MUSTTAIL)
+// 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

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to