[all-commits] [llvm/llvm-project] 7125d6: [Coroutines][2/6] New pass manager: coro-split

Brian Gesiak via All-commits all-commits at lists.llvm.org
Mon Feb 17 20:35:43 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7125d66f9969605d886b5286780101a45b5bed67
      https://github.com/llvm/llvm-project/commit/7125d66f9969605d886b5286780101a45b5bed67
  Author: Brian Gesiak <modocache at gmail.com>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

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

  Log Message:
  -----------
  [Coroutines][2/6] New pass manager: coro-split

Summary:
This patch has four dependencies:

1. The first in this series of patches that implement coroutine passes in the
   new pass manager: https://reviews.llvm.org/D71898.
2. A patch that introduces an API for CGSCC passes to add new reference
   edges to a `LazyCallGraph`, `updateCGAndAnalysisManagerForCGSCCPass`:
   https://reviews.llvm.org/D72025.
3. A patch that introduces a `CallGraphUpdater` helper class that is
   capable of mutating internal `LazyCallGraph` state in order to insert
   new function nodes into a specific SCC: https://reviews.llvm.org/D70927.
4. And finally, a small edge case fix for updating `LazyCallGraph` that
   patch 3 above happens to run into: https://reviews.llvm.org/D72226.

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

Some notes:
* 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.
* 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`.

Reviewers: GorNishanov, lewissbaker, chandlerc, jdoerfert, junparser, deadalnix, wenlei

Reviewed By: wenlei

Subscribers: wenlei, qcolombet, EricWF, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71899




More information about the All-commits mailing list