[llvm] [profcheck][coro] Add Branch Weights in to select in replaceSwitchResumeCoroFree. (PR #211970)
Weibo He via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 25 04:09:28 PDT 2026
================
@@ -192,6 +192,10 @@ static void replaceSwitchResumeCoroFree(const coro::Shape &Shape,
DestroyAddr, "destroy");
Value *CleanupFn =
EntryBuilder.CreatePointerCast(&Cleanup, DestroyFn->getType());
+ // Determine whether the destroy slot holds the address of f.destroy (heap
+ // frame) or f.cleanup (elided frame). If it is f.destroy, the frame needs
+ // to be freed; otherwise, it is an elided frame and must not be freed.
+ // This comparison result is used in CreateSelect below.
----------------
NewSigma wrote:
nit: please remove
https://github.com/llvm/llvm-project/pull/211970
More information about the llvm-commits
mailing list