[PATCH] D71899: [Coroutines][2/6] New pass manager: coro-split

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 20:41:37 PST 2019


wenlei added a comment.

> The  devirt trigger here is to restart CGSCC pipeline to run coro-split again to split the coroutine function. There is no need to introduce devirt trigger in NewPM  since we call coro-split pass manually.

Manually schedule the 2nd coro-split pass is only a workaround before we can trigger CGSCC passes on the split funclet like we did for legacy PM. It does the split without restarting CGSCC passes so it works, but it also leaves performance on the table because the split funclets won't go through many opt passes of CGSCC pipeline. Yes, I agree don't need to introduce devirt trigger with new PM, but that's because I think we can request CGSCC passes on split funclet via other mechanism like `CGSCCUpdateResult`, not just because 2nd coro-split pass is manually scheduled.

That said, for new PM, this patch implemented devirt trigger insertion only, but not the devirt detection part. I would suggest we have all or nothing for a working mechanism of rerunning CGSCC passes for split funclet. Funclets like resume contains actual code, not just stubs, so IMHO fully optimizing these funclets is an essential part of coroutine support.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71899/new/

https://reviews.llvm.org/D71899





More information about the llvm-commits mailing list