Progress:
In progressChanges

Summary

  1. Revert "[Coroutines] Move CoroEarly pass to before AlwaysInliner" (details)
  2. [Coroutines] Set presplit attribute in Clang instead of CoroEarly pass (details)
  3. [TableGen] Pass SmallVector to union_modes instead of returning a std::vector. (details)
  4. Add a missing debug assertion in <list>. (details)
  5. Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass" (details)
Commit c0211e8d7d0b797fd11543c3d3f9fecf3b2069cf by lxfind
Revert "[Coroutines] Move CoroEarly pass to before AlwaysInliner"

This reverts commit 2b50f5a4343f8fb06acaa5c36355bcf58092c9cd.
Forgot to update the description of the commit to sync with phabricator. Going to redo the commit.
The file was modifiedllvm/test/Transforms/Coroutines/ex3.ll
The file was modifiedclang/test/CodeGenCoroutines/coro-always-inline.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex2.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex5.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-O2.ll
The file was modifiedclang/lib/CodeGen/CGCoroutine.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex4.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-01.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex1.ll
The file was removedclang/test/CodeGenCoroutines/coro-always-inline-resume.cpp
The file was modifiedllvm/test/Transforms/Coroutines/phi-coro-end.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroEarly.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-recursive.ll
The file was modifiedllvm/test/Transforms/Coroutines/restart-trigger.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex0.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
Commit fa6b54c44ab1d5f579304eadb7ac8bd7e72d0e77 by lxfind
[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass

Presplit coroutines cannot be inlined. During AlwaysInliner we check if a function is a presplit coroutine, if so we skip inlining.
The presplit coroutine attributes are set in CoroEarly pass.
However in O0 pipeline, AlwaysInliner runs before CoroEarly, so the attribute isn't set yet and will still inline the coroutine.
This causes Clang to crash: https://bugs.llvm.org/show_bug.cgi?id=49920

To fix this, we set the attributes in the Clang front-end instead of in CoroEarly pass.

Reviewed By: rjmccall, ChuanqiXu

Differential Revision: https://reviews.llvm.org/D100282
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex2.ll
The file was addedclang/test/CodeGenCoroutines/coro-always-inline-resume.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex1.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex5.ll
The file was modifiedllvm/test/Transforms/Coroutines/restart-trigger.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex0.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-01.ll
The file was modifiedllvm/test/Transforms/Coroutines/phi-coro-end.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-recursive.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-O2.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex4.ll
The file was modifiedclang/test/CodeGenCoroutines/coro-always-inline.cpp
The file was modifiedclang/lib/CodeGen/CGCoroutine.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroEarly.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex3.ll
Commit b7ddd45081a0bfebb32ab46a7a05ebaf7bc88942 by craig.topper
[TableGen] Pass SmallVector to union_modes instead of returning a std::vector.

The number of modes is small so this should avoid a heap allocation.

Also replace std::set with SmallSet.
The file was modifiedllvm/utils/TableGen/CodeGenDAGPatterns.cpp
The file was modifiedllvm/utils/TableGen/InfoByHwMode.h
Commit 5e7367d3e44424c058cc8d891dac0a0088586329 by arthur.j.odwyer
Add a missing debug assertion in <list>.

This came up in D100595.

Differential Revision: https://reviews.llvm.org/D100728
The file was modifiedlibcxx/include/list
Commit 5faba87938779c595f2b4e40f933bae6571bc421 by lxfind
Revert "[Coroutines] Set presplit attribute in Clang instead of CoroEarly pass"

This reverts commit fa6b54c44ab1d5f579304eadb7ac8bd7e72d0e77.
The commited patch broke mlir tests. It seems that mlir tests depend on coroutine function properties set in CoroEarly pass.
The file was modifiedllvm/test/Transforms/Coroutines/restart-trigger.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
The file was modifiedclang/lib/CodeGen/CGCoroutine.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroEarly.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex4.ll
The file was modifiedllvm/test/Transforms/Coroutines/phi-coro-end.ll
The file was removedclang/test/CodeGenCoroutines/coro-always-inline-resume.cpp
The file was modifiedllvm/test/Transforms/Coroutines/ex3.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-O2.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex5.ll
The file was modifiedclang/test/CodeGenCoroutines/coro-always-inline.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-01.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex2.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex0.ll
The file was modifiedllvm/test/Transforms/Coroutines/ex1.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-recursive.ll