[llvm] [Coroutines] Refactor CoroShape::buildFrom for future use by ABI objects (PR #108623)
Tyler Nowicki via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 15:12:55 PDT 2024
================
@@ -298,8 +286,58 @@ void coro::Shape::buildFrom(Function &F) {
}
}
- // If for some reason, we were not able to find coro.begin, bailout.
- if (!CoroBegin) {
+ // If there is no CoroBegin then this is not a coroutine.
+ if (!CoroBegin)
+ return;
+
+ // Determination of ABI and initializing lowering info
+ auto Id = CoroBegin->getId();
+ auto IntrID = Id->getIntrinsicID();
+ if (IntrID == Intrinsic::coro_id) {
----------------
TylerNowicki wrote:
Done
https://github.com/llvm/llvm-project/pull/108623
More information about the llvm-commits
mailing list