[PATCH] D116327: [Coroutines] Enhance symmetric transfer for constant CmpInst

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 27 21:17:12 PST 2021


ChuanqiXu created this revision.
ChuanqiXu added reviewers: rjmccall, lxfind, aeubanks.
ChuanqiXu added a project: LLVM.
Herald added a subscriber: hiraditya.
ChuanqiXu requested review of this revision.
Herald added a subscriber: llvm-commits.

This fixes bug52896: https://github.com/llvm/llvm-project/issues/52896.

Simply, some symmetric transfer optimization chances get invalided due to we delete some inlined optimization passes in https://github.com/llvm/llvm-project/commit/822b92aae439c4ba2946980c8a27bd2c8a62d90c#diff-8cf21bda84c593733aa099f89fe7d197fd83203c6bc4f6fbdcd94f8bb4256d23L1138-L1147 . This would cause stack-overflow in some situations which should be avoided by the design of coroutine: https://godbolt.org/z/E55h9Pv9f

This patch tries to fix this by transforming the constant CmpInst instruction which was done in the deleted passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116327

Files:
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/test/Transforms/Coroutines/coro-split-musttail4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116327.396364.patch
Type: text/x-patch
Size: 4827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211228/a1f2475a/attachment.bin>


More information about the llvm-commits mailing list