[PATCH] D76911: [Coroutines 1/2] Improve symmetric control transfer feature
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 03:10:27 PDT 2020
junparser created this revision.
junparser added reviewers: modocache, wenlei, GorNishanov, lewissbaker, rsmith.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
junparser edited the summary of this revision.
junparser added a child revision: D76913: [Coroutines 2/2] Improve symmetric control transfer feature .
As @rsmith find in https://bugs.llvm.org/show_bug.cgi?id=45130 that musttail attribute is not added to some of the resume intrinsics. These are some optimizations need to do here:
1. We only check llvm.coro.subfn.addr for now, however, the intrinsic can be replaced in CoroElide pass. Furthermore, we can support other function calls as long as they obey rules of musttail.
2. in simplifyTerminatorLeadingToRet, we only check switch and unconditional branch instructions while suspend switch instruction can be reduced as conditional branch. This also break the optimization.
This patch implements part 1, all of the rules in shouldBeMustTail are same as verifyMustTailCall
TestPlan: check-llvm
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76911
Files:
llvm/lib/Transforms/Coroutines/CoroSplit.cpp
llvm/test/Transforms/Coroutines/coro-split-musttail2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76911.253060.patch
Type: text/x-patch
Size: 4618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200327/21403036/attachment.bin>
More information about the llvm-commits
mailing list