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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 20:23:30 PST 2022


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:1227
+
+      BasicBlock *BB = BR->getParent();
+      // Handle the case the condition of the conditional branch is constant.
----------------
junparser wrote:
> Instead simplify each instructions at pieces,would you use SimplifyInstructionsInBlock to handle each basic block at once?
What this function do is slightly different from `SimplifyInstructionsInBlock`. The function is trying to simplify the sequence of terminators to ret. So what the function do is intra-BB optimization which seems not be able to be handled by `SimplifyInstructionsInBlock`. And this function is more effective than running `SimplifyInstructionsInBlock` for each basic blocks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116327



More information about the llvm-commits mailing list