[all-commits] [llvm/llvm-project] 77ca2a: [Coroutine] Collect CoroBegin if all of terminator...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Apr 21 20:22:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77ca2a689368e3a27a72b432ab93c9c352d73073
      https://github.com/llvm/llvm-project/commit/77ca2a689368e3a27a72b432ab93c9c352d73073
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-04-22 (Thu, 22 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroElide.cpp
    M llvm/test/Transforms/Coroutines/coro-elide.ll

  Log Message:
  -----------
  [Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy

Summary: The original logic seems to be we could collecting a CoroBegin
if one of the terminators could be dominated by one of coro.destroy,
which doesn't make sense.
This patch rewrites the logics to collect CoroBegin if all of
terminators are dominated by one coro.destroy. If there is no such
coro.destroy, we would call hasEscapePath to evaluate if we should
collect it.

Test Plan: check-llvm

Reviewed by: lxfind

Differential Revision: https://reviews.llvm.org/D100614




More information about the All-commits mailing list