[PATCH] D100614: [Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 15 19:58:34 PDT 2021
ChuanqiXu created this revision.
ChuanqiXu added reviewers: junparser, lxfind, rjmccall.
Herald added a subscriber: hiraditya.
ChuanqiXu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The original logic seems to be we could collecting a CoroBegin if one of the terminators could be dominated by one of coro.destroy, which doesn't make sense.
This patch rewrites the logics to collect CoroBegin if all of terminators are dominated by one coro.destroy. If there is no such coro.destroy, we would call hasEscapePath to evaluate if we should collect it.
Test Plan: check-llvm
https://reviews.llvm.org/D100614
Files:
llvm/lib/Transforms/Coroutines/CoroElide.cpp
llvm/test/Transforms/Coroutines/coro-elide.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100614.337969.patch
Type: text/x-patch
Size: 3717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210416/207619c6/attachment.bin>
More information about the llvm-commits
mailing list