ChuanqiXu9 wrote: > > Could elaborate it? Especially why it is safe to not lower coro.end to ret > > void? > > The idea is: if we lower `coro.end` to `ret void`, users of `coro.end` will > become unreachable. Thus, I assume that if the frontend uses the return value > of `coro.end`, the intention is to determine whether we are in the start or > resume part instead of returning. > > Personally, I think the problem is that `coro.end` mixes two functionalities: > querying where we are and lowering to some code. I think it might be > reasonable to introduce a new intrinsic, `llvm.coro.where`, and drop the > return value of `coro.end`. However, I’d prefer to hear others’ thoughts > before actually doing it.
Since I didn't have time to look into details, the instinct reaction to my mind is, then why do we change the lowering of `coro.end` **conditionally**? I mean, if it is good, it will be better and simpler to do it unconditionally. https://github.com/llvm/llvm-project/pull/151067 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits