[PATCH] D23234: [Coroutines] Part 5: Add CGSCC restart trigger

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 6 10:44:24 PDT 2016


GorNishanov marked an inline comment as done.
GorNishanov added a comment.

In https://reviews.llvm.org/D23234#507893, @mehdi_amini wrote:

> I'm still struggling to figure why you need to force the restart, can you point to a document that explains it?
>  (I think it should be explained in the code somehow as well).


Would this comment address your concerns? I can add it to the beginning of CoroSplit.cpp

  // We present a coroutine to an LLVM as an ordinary function with suspension
  // points marked up with intrinsics. We let the optimizer party on the coroutine
  // as a single function for as long as possible. Shortly before the coroutine is
  // eligible to be inlined into its callers, we split up the coroutine into parts
  // corresponding to an initial, resume and destroy invocations of the coroutine,
  // adds them to the current SCC and restart the IPO pipeline to optimize the
  // coroutine subfunctions we extracted before proceeding to the caller of the
  // coroutine.

P.S.

This was discussed in RFC: Coroutine Optimization Passes: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102337.html .


https://reviews.llvm.org/D23234





More information about the llvm-commits mailing list