llvm-project/llvm/test/Transforms/Coroutines
Chuanqi Xu 77ca2a6893 [Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy
Summary: 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

Reviewed by: lxfind

Differential Revision: https://reviews.llvm.org/D100614
2021-04-22 11:21:37 +08:00
..
Inputs [coroutine] should disable inline before calling coro split 2020-12-08 08:53:08 -08:00
ArgAddr.ll [LICM][Coroutine] Don't sink stores from loops with coro.suspend instructions 2021-03-03 15:21:57 -08:00
coro-alloc-with-param-O0.ll
coro-alloc-with-param-O2.ll
coro-alloca-01.ll [Coroutine] Properly determine whether an alloca should live on the frame 2020-10-29 23:56:05 -07:00
coro-alloca-02.ll [Coroutine] Properly determine whether an alloca should live on the frame 2020-10-29 23:56:05 -07:00
coro-alloca-03.ll [Coroutine] Properly determine whether an alloca should live on the frame 2020-10-29 23:56:05 -07:00
coro-alloca-04.ll [Coroutine] Properly determine whether an alloca should live on the frame 2020-10-29 23:56:05 -07:00
coro-alloca-05.ll [Coroutine] Move all used local allocas to the .resume function 2020-11-09 17:24:49 -08:00
coro-alloca-06.ll [Coroutine] Allocas used by StoreInst does not always escape 2020-11-16 09:14:44 -08:00
coro-alloca-07.ll [Coroutine] Check indirect uses of alloca when checking lifetime info 2021-02-24 18:29:23 -08:00
coro-alloca-08.ll [Coroutine] Check indirect uses of alloca when checking lifetime info 2021-02-24 18:29:23 -08:00
coro-async-unreachable.ll [coro async] Allow a coro.suspend.async to specify which argument is the context argument 2021-03-03 08:27:37 -08:00
coro-async.ll Update the linkage name of coro-split functions in the debug info. 2021-04-09 09:50:56 -07:00
coro-catchswitch-cleanuppad.ll
coro-catchswitch.ll
coro-cleanup-lowering.ll
coro-cleanup.ll
coro-debug-O2.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
coro-debug-frame-variable.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
coro-debug.ll Update the linkage name of coro-split functions in the debug info. 2021-04-09 09:50:56 -07:00
coro-early.ll
coro-eh-aware-edge-split-00.ll
coro-eh-aware-edge-split-01.ll
coro-eh-aware-edge-split-02.ll
coro-elide-musttail.ll [Coroutine] Relax CoroElide musttail check 2021-02-18 19:36:11 -08:00
coro-elide.ll [Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy 2021-04-22 11:21:37 +08:00
coro-frame-arrayalloca.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-frame-reuse-alloca-00.ll
coro-frame-reuse-alloca-01.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-frame-reuse-alloca-02.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-frame-reuse-alloca-03.ll
coro-frame-reuse-alloca-04.ll [Coroutine] Remain alignment information when merging frame variables 2021-01-20 18:59:00 +08:00
coro-frame-reuse-alloca-05.ll [Coroutine] Remain alignment information when merging frame variables 2021-01-20 18:59:00 +08:00
coro-frame-unreachable.ll
coro-frame.ll
coro-heap-elide.ll [SimplifyCFG] Teach removeEmptyCleanup() to preserve DomTree 2020-12-20 00:18:33 +03:00
coro-inline.ll [test] Pin some tests to legacy PM 2020-12-26 13:46:02 -08:00
coro-materialize.ll
coro-padding.ll
coro-param-copy.ll
coro-retcon-alloca.ll We can only move static allocas into the resume entry points 2021-02-05 06:06:10 -08:00
coro-retcon-frame.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-retcon-once-value.ll
coro-retcon-once-value2.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-retcon-resume-values.ll [InstCombine] Remove unused llvm.experimental.noalias.scope.decl 2021-01-24 13:55:50 +01:00
coro-retcon-resume-values2.ll [CGSCC][Coroutine][NewPM] Properly support function splitting/outlining 2021-01-06 11:19:15 -08:00
coro-retcon-unreachable.ll [CoroSplit][NewPM] Don't call LazyCallGraph functions to split when no clones 2021-01-07 14:06:35 -08:00
coro-retcon-value.ll [InstCombine] Remove unused llvm.experimental.noalias.scope.decl 2021-01-24 13:55:50 +01:00
coro-retcon.ll [InstCombine] Remove unused llvm.experimental.noalias.scope.decl 2021-01-24 13:55:50 +01:00
coro-spill-after-phi.ll
coro-spill-corobegin.ll
coro-spill-defs-before-corobegin.ll
coro-spill-promise.ll [Coroutine] Update promise object's final layout index 2021-01-12 17:44:02 -08:00
coro-split-00.ll [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
coro-split-01.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
coro-split-02.ll
coro-split-alloc.ll
coro-split-dbg.ll
coro-split-eh-00.ll
coro-split-eh-01.ll
coro-split-hidden.ll [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
coro-split-musttail.ll
coro-split-musttail1.ll
coro-split-musttail2.ll
coro-split-musttail3.ll
coro-split-recursive.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
coro-split-sink-lifetime-01.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-split-sink-lifetime-02.ll [Coroutines, test] Fix use of var defined in CHECK-NOT 2021-04-07 09:42:58 +01:00
coro-split-sink-lifetime-03.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-split-sink-lifetime-04.ll [Coroutines] Refactor/Rewrite Spill and Alloca processing 2020-10-10 22:21:34 -07:00
coro-swifterror.ll
ex0.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
ex1.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
ex2.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
ex3.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
ex4.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
ex5.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
no-suspend.ll [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
phi-coro-end.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
restart-trigger.ll Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" 2021-04-18 17:22:28 -07:00
smoketest.ll