================
@@ -1102,6 +1118,45 @@ void coro::SwitchCloner::create() {
// Replacing coro.free with 'null' in cleanup to suppress deallocation code.
if (FKind == coro::CloneKind::SwitchCleanup)
elideCoroFree(NewFramePtr);
+
+ // Update branch weights of the cloned resume switch if we have profile data.
+ if (Shape.ABI == coro::ABI::Switch) {
----------------
NewSigma wrote:
This is always true. Please remove it and extract the body into a helper
function.
https://github.com/llvm/llvm-project/pull/184466
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits