[PATCH] D95807: [RFC][Coroutines] Add the newly generated SCCs back to the CGSCC work queue after CoroSplit actually happened

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 12:46:14 PST 2021


lxfind added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:1710
   removeCoroEnds(Shape, &CG);
-  postSplitCleanup(F);
+  removeUnreachableBlocks(F);
 
----------------
aeubanks wrote:
> this could regress coroutines under the legacy PM behavior since we don't run `postSplitCleanup()` here? but maybe we don't care about the legacy PM so much anymore.
Not really. CoroSplit for legacy PM works in a similar way. Function simplifications happen after CoroSplit (if not O0) as well.



================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:2004
+      UR.CWorklist.insert(&C);
+      for (Function *Clone : Clones)
+        UR.CWorklist.insert(CG.lookupSCC(CG.get(*Clone)));
----------------
aeubanks wrote:
> are all `Clones` guaranteed to be in different SCC?
No. But CWorklist is a map so redundant insertions won't happen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95807



More information about the llvm-commits mailing list