[PATCH] D71899: [Coroutines][2/6] New pass manager: coro-split

Brian Gesiak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 26 06:26:23 PST 2019


modocache created this revision.
modocache added reviewers: GorNishanov, lewissbaker, chandlerc, jdoerfert, junparser.
Herald added subscribers: hiraditya, EricWF, qcolombet.
Herald added a reviewer: deadalnix.
Herald added a project: LLVM.

Depends on https://reviews.llvm.org/D71898.

The second in a series of patches that ports the LLVM coroutines passes
to the new pass manager infrastructure. This patch implements 'coro-split'.

Using the new  CGSCC pass manager resulted in IR being printed in the reverse
order in some tests. To prevent FileCheck checks from failing due to
these reversed orders, this patch splits up test files that test
multiple different coroutine functions: specifically coro-alloc-with-param.ll,
coro-split-eh.ll, and coro-eh-aware-edge-split.ll.

Some other notes:

- CoroSplit.cpp contained 2 overloads of `splitCoroutine`, one of which dispatched to the other based on the coroutine ABI being used (C++20 switch-based versus Swift returned-continuation-based). I found this confusing, especially with the additional branching based on `CallGraph` vs. `LazyCallGraph`, so I removed the ABI-checking overload of `splitCoroutine`.
- I added a few `const` to the file with the intent of improving readability.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71899

Files:
  llvm/include/llvm-c/Transforms/Coroutines.h
  llvm/include/llvm/Transforms/Coroutines.h
  llvm/include/llvm/Transforms/Coroutines/CoroSplit.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/Coroutines/CoroInternal.h
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/lib/Transforms/Coroutines/Coroutines.cpp
  llvm/test/Transforms/Coroutines/coro-alloc-with-param-O0.ll
  llvm/test/Transforms/Coroutines/coro-alloc-with-param-O2.ll
  llvm/test/Transforms/Coroutines/coro-alloc-with-param.ll
  llvm/test/Transforms/Coroutines/coro-catchswitch.ll
  llvm/test/Transforms/Coroutines/coro-debug.ll
  llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split-00.ll
  llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split-01.ll
  llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split-02.ll
  llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split.ll
  llvm/test/Transforms/Coroutines/coro-frame-arrayalloca.ll
  llvm/test/Transforms/Coroutines/coro-frame-unreachable.ll
  llvm/test/Transforms/Coroutines/coro-frame.ll
  llvm/test/Transforms/Coroutines/coro-materialize.ll
  llvm/test/Transforms/Coroutines/coro-padding.ll
  llvm/test/Transforms/Coroutines/coro-param-copy.ll
  llvm/test/Transforms/Coroutines/coro-spill-after-phi.ll
  llvm/test/Transforms/Coroutines/coro-spill-corobegin.ll
  llvm/test/Transforms/Coroutines/coro-split-00.ll
  llvm/test/Transforms/Coroutines/coro-split-02.ll
  llvm/test/Transforms/Coroutines/coro-split-alloc.ll
  llvm/test/Transforms/Coroutines/coro-split-dbg.ll
  llvm/test/Transforms/Coroutines/coro-split-eh-00.ll
  llvm/test/Transforms/Coroutines/coro-split-eh-01.ll
  llvm/test/Transforms/Coroutines/coro-split-eh.ll
  llvm/test/Transforms/Coroutines/coro-split-hidden.ll
  llvm/test/Transforms/Coroutines/coro-split-musttail.ll
  llvm/test/Transforms/Coroutines/no-suspend.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71899.235339.patch
Type: text/x-patch
Size: 59773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191226/0a8b8230/attachment.bin>


More information about the llvm-commits mailing list