[all-commits] [llvm/llvm-project] f545ee: [CIR] Implement musttail cleanup handling (#224169)
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Thu Sep 17 09:26:01 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f545ee781745eba47efe20d421c2e7e3d86a1c5e
https://github.com/llvm/llvm-project/commit/f545ee781745eba47efe20d421c2e7e3d86a1c5e
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/include/clang/CIR/MissingFeatures.h
M clang/lib/CIR/CodeGen/CIRGenCall.cpp
M clang/lib/CIR/CodeGen/CIRGenDecl.cpp
M clang/lib/CIR/CodeGen/EHScopeStack.h
M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
M clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
M clang/test/CIR/CodeGen/attr-musttail.cpp
A clang/test/CIR/IR/invalid-cleanup-scope-musttail.cir
A clang/test/CIR/Transforms/flatten-cleanup-scope-musttail.cir
Log Message:
-----------
[CIR] Implement musttail cleanup handling (#224169)
A musttail call can occur within a cleanup scope if (and only if) the
cleanup is a lifetime end marker or a stack restore. These can be safely
omitted by a direct return such as is needed for a tail call.
This change adds error checking to verify that only these cleanups are
on the EH stack when a musttail call is encountered and updates the CFG
flattening pass to add special handling that avoids routing musttail
call returns through the cleanup handler.
Assisted-by: Cursor / claude-opus-5
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list