[clang] clang: Add convergence control bundles when creating calls (PR #230765)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 10 12:14:47 PDT 2026
================
@@ -5448,12 +5448,13 @@ CodeGenFunction::getBundlesForFunclet(llvm::Value *Callee) {
llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee,
ArrayRef<llvm::Value *> args,
const llvm::Twine &name) {
- llvm::CallInst *call = Builder.CreateCall(
- callee, args, getBundlesForFunclet(callee.getCallee()), name);
+ SmallVector<llvm::OperandBundleDef> BundleList =
+ getBundlesForFunclet(callee.getCallee());
+ if (auto *F = dyn_cast<llvm::Function>(callee.getCallee());
+ F && F->isConvergent())
----------------
efriedma-quic wrote:
I don't think this pattern works correctly with indirect calls. Indirect calls are probably irrelevant for many targets that care about convergence, but I wouldn't want to assume the combination is impossible.
https://github.com/llvm/llvm-project/pull/230765
More information about the cfe-commits
mailing list