[coro][NFC] Move switch basic block to beginning of coroutine (#143626)

This makes the code flow when reading the LLVM IR of a split coroutine a
bit more natural. It does not change anything from an end-user
perspective but makes debugging the CoroSplit pass slightly easier.
This commit is contained in:
Adrian Vogelsgesang 2025-06-11 09:39:31 +02:00 committed by GitHub
parent 13115276d0
commit 14c11e4bcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -703,6 +703,7 @@ void coro::BaseCloner::replaceEntryBlock() {
auto *SwitchBB =
cast<BasicBlock>(VMap[Shape.SwitchLowering.ResumeEntryBlock]);
Builder.CreateBr(SwitchBB);
SwitchBB->moveAfter(Entry);
break;
}
case coro::ABI::Async: