[PATCH] D85812: [CORO] should disable inline before calling coro split
Yifeng Dong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 23:42:41 PDT 2020
dongAxis1944 created this revision.
dongAxis1944 added a project: LLVM.
Herald added subscribers: llvm-commits, modocache, haicheng, hiraditya, eraman.
dongAxis1944 requested review of this revision.
it will get the following error:
"coroutine should have exactly one defining @llvm.coro.begin"
with the following situation:
there are two coroutine functions named A and B, and B is called by A
If there is the chance inline B to A before LLVM called CoroSplit pass, it will get this error.
After checking the LLVM code, we found there are 3 situations to triggle this error:
1. mark B as always inline under O0 level
2. mark B as always inline and enable new pm under O0 level
3. mark B as always inline and set valid sample profile
So we think it will be better disable inline coroutine function before llvm called CoroSplit Pass.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85812
Files:
llvm/include/llvm/Transforms/Coroutines.h
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Transforms/Coroutines/CoroInternal.h
llvm/lib/Transforms/IPO/AlwaysInliner.cpp
llvm/test/Transforms/Coroutines/Inputs/sample.text.prof
llvm/test/Transforms/Coroutines/coro-inline-O0.ll
llvm/test/Transforms/Coroutines/coro-inline-O2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85812.284977.patch
Type: text/x-patch
Size: 15267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/828375e4/attachment.bin>
More information about the llvm-commits
mailing list