[all-commits] [llvm/llvm-project] 2b50f5: [Coroutines] Move CoroEarly pass to before AlwaysI...
Xun Li via All-commits
all-commits at lists.llvm.org
Sun Apr 18 14:58:09 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2b50f5a4343f8fb06acaa5c36355bcf58092c9cd
https://github.com/llvm/llvm-project/commit/2b50f5a4343f8fb06acaa5c36355bcf58092c9cd
Author: Xun Li <lxfind at gmail.com>
Date: 2021-04-18 (Sun, 18 Apr 2021)
Changed paths:
M clang/lib/CodeGen/CGCoroutine.cpp
A clang/test/CodeGenCoroutines/coro-always-inline-resume.cpp
M clang/test/CodeGenCoroutines/coro-always-inline.cpp
M llvm/lib/Transforms/Coroutines/CoroEarly.cpp
M llvm/test/Transforms/Coroutines/coro-debug-O2.ll
M llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
M llvm/test/Transforms/Coroutines/coro-split-01.ll
M llvm/test/Transforms/Coroutines/coro-split-recursive.ll
M llvm/test/Transforms/Coroutines/ex0.ll
M llvm/test/Transforms/Coroutines/ex1.ll
M llvm/test/Transforms/Coroutines/ex2.ll
M llvm/test/Transforms/Coroutines/ex3.ll
M llvm/test/Transforms/Coroutines/ex4.ll
M llvm/test/Transforms/Coroutines/ex5.ll
M llvm/test/Transforms/Coroutines/phi-coro-end.ll
M llvm/test/Transforms/Coroutines/restart-trigger.ll
Log Message:
-----------
[Coroutines] Move CoroEarly pass to before AlwaysInliner
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
Differential Revision: https://reviews.llvm.org/D100282
More information about the All-commits
mailing list