llvm-project/llvm/test/Transforms/Coroutines
Arthur Eubanks 9bd66b312c [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE
CoroSplit lowers various coroutine intrinsics. It's a CGSCC pass and
CGSCC passes don't run on unreachable functions. Normally GlobalDCE will
come along and delete unreachable functions, but we don't run GlobalDCE
under -O0, so an unreachable function with coroutine intrinsics may
never have CoroSplit run on it.

This patch adds GlobalDCE when coroutines intrinsics are present. It
also now runs all coroutine passes conditional when coroutine intrinsics
are present. This should also solve the -O0 regression reported in
D105877 due to LazyCallGraph construction.

Fixes https://github.com/llvm/llvm-project/issues/54117

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D122275
2022-03-23 11:03:26 -07:00
..
Inputs
ArgAddr.ll
coro-align8-02.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-align8.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-align16.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-align32.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-align64-02.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-align64.ll [NFC] [Coroutines] Rename tests in coro-align 2022-01-24 11:04:13 +08:00
coro-alloc-with-param-O0.ll
coro-alloc-with-param-O2.ll
coro-alloca-01.ll
coro-alloca-02.ll
coro-alloca-03.ll
coro-alloca-04.ll
coro-alloca-05.ll
coro-alloca-06.ll
coro-alloca-07.ll
coro-alloca-08.ll
coro-alloca-09.ll [Coroutines] Ignore partial lifetime markers refer of an alloca 2021-10-22 09:49:50 +08:00
coro-async-addr-lifetime-infinite-loop-bug.ll [coro async] Don't use lifetime.start based alloca localization for ABI.Async/ABI.Retcon 2021-12-06 11:50:51 -08:00
coro-async-addr-lifetime-start-bug.ll [coro async] Disable lifetime.start sinking for ABI::Async and ABI::Retcon 2021-12-06 10:59:43 -08:00
coro-async-phi.ll
coro-async-remat.ll
coro-async-unreachable.ll
coro-async.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-byval-param.ll
coro-catchswitch-cleanuppad.ll [SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP 2022-02-17 12:13:55 +03:00
coro-catchswitch.ll
coro-cleanup-lowering.ll
coro-cleanup.ll
coro-debug-O2.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-debug-coro-frame.ll [debug-info] Debug salvage llvm.dbg.addr in original function that point into the coroutine frame when splitting coros. 2022-03-09 14:02:09 -08:00
coro-debug-dbg.addr-swift.ll [debug-info] Debug salvage llvm.dbg.addr in original function that point into the coroutine frame when splitting coros. 2022-03-09 14:02:09 -08:00
coro-debug-dbg.addr.ll [debug-info] If one sees a spill with a dbg.addr use, salvageDebugInfo upon it and don't hoist it. 2022-02-11 15:15:13 -08:00
coro-debug-dbg.values-not_used_in_frame.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-debug-dbg.values.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-debug-frame-variable.ll [debug-info] Debug salvage llvm.dbg.addr in original function that point into the coroutine frame when splitting coros. 2022-03-09 14:02:09 -08:00
coro-debug.ll [llvm][test] rewrite callbr to use i rather than X constraint NFC 2022-01-11 11:31:08 -08: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 [CoroElide] Remove fallback for frame layout determination 2022-03-07 11:23:02 +01:00
coro-elide-stat.ll [CoroElide] Remove fallback for frame layout determination 2022-03-07 11:23:02 +01:00
coro-elide.ll [CoroElide] Remove fallback for frame layout determination 2022-03-07 11:23:02 +01:00
coro-frame-arrayalloca.ll
coro-frame-reuse-alloca-00.ll
coro-frame-reuse-alloca-01.ll
coro-frame-reuse-alloca-02.ll
coro-frame-reuse-alloca-03.ll
coro-frame-reuse-alloca-04.ll
coro-frame-reuse-alloca-05.ll
coro-frame-unreachable.ll
coro-frame.ll
coro-heap-elide.ll [CoroElide] Remove fallback for frame layout determination 2022-03-07 11:23:02 +01:00
coro-inline.ll [opt] Remove some legacy PM flags 2021-09-13 15:50:03 -07:00
coro-internal-O0.ll [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00
coro-materialize.ll
coro-noalias-param.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-padding.ll
coro-param-copy.ll
coro-retcon-alloca.ll Coroutines: don't infer function attrs before lowering 2021-11-04 10:24:28 +00:00
coro-retcon-frame.ll
coro-retcon-once-private.ll [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00
coro-retcon-once-value.ll [InstCombine] Canonicalize SPF to min/max intrinsics 2022-02-24 09:01:20 +01:00
coro-retcon-once-value2.ll
coro-retcon-opaque-ptr.ll [Coroutines] Allow FramePtr to be an Argument 2022-03-07 10:58:56 +01:00
coro-retcon-resume-values.ll
coro-retcon-resume-values2.ll
coro-retcon-unreachable.ll
coro-retcon-value.ll
coro-retcon.ll Coroutines: don't infer function attrs before lowering 2021-11-04 10:24:28 +00:00
coro-spill-after-phi.ll
coro-spill-corobegin.ll [NFC] [Coroutines] Fix incorrect use of coroutine intrinsics 2022-01-04 11:13:48 +08:00
coro-spill-defs-before-corobegin.ll
coro-spill-promise.ll
coro-split-00.ll
coro-split-01.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
coro-split-02.ll
coro-split-alloc.ll
coro-split-dbg.ll
coro-split-eh-00.ll [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws 2021-12-09 14:58:06 +08:00
coro-split-eh-01.ll [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws 2021-12-09 14:58:06 +08:00
coro-split-hidden.ll
coro-split-musttail.ll
coro-split-musttail1.ll
coro-split-musttail2.ll
coro-split-musttail3.ll
coro-split-musttail4.ll [Coroutines] Enhance symmetric transfer for constant CmpInst 2022-01-12 10:14:37 +08:00
coro-split-musttail5.ll [Coroutines] Handle lifetime markers, bitcast and unused instruciton for symmetric transfer 2022-01-12 15:58:38 +08:00
coro-split-musttail6.ll [Coroutines] Handle lifetime markers, bitcast and unused instruciton for symmetric transfer 2022-01-12 15:58:38 +08:00
coro-split-musttail7.ll [Coroutines] Handle lifetime markers, bitcast and unused instruciton for symmetric transfer 2022-01-12 15:58:38 +08:00
coro-split-recursive.ll [CoroSplit] Avoid self-replacement 2022-03-14 13:53:31 +01:00
coro-split-sink-lifetime-01.ll
coro-split-sink-lifetime-02.ll
coro-split-sink-lifetime-03.ll
coro-split-sink-lifetime-04.ll
coro-swifterror.ll
coro-zero-alloca.ll
ex0.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
ex1.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
ex2.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
ex3.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
ex4.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
ex5.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
no-suspend.ll
phi-coro-end.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
restart-trigger.ll [Coroutines] Set presplit attribute in Clang and mlir 2022-01-05 10:25:02 +08:00
smoketest.ll [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00