[PATCH] D129352: [CodeGen] Limit building time for CodeGenPrepare

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 20:41:56 PDT 2022


LuoYuanke added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:7103
+      // So we put the operands defs' BBs into FreshBBs to do optmization.
+      for (unsigned I = 0; I < NI->getNumOperands(); ++I) {
+        auto *OpDef = dyn_cast<Instruction>(NI->getOperand(I));
----------------
xiangzhangllvm wrote:
> LuoYuanke wrote:
> > The instruction is cloned. Why the def of its operand need to be sinked?
> When we copy an Instruction (to a new place) to do optimization, means we updated an instruction. This instruction's operand defs may have new opportunity to sink to the optimized new instruction.
Here we just copy the instruction. We know it is sinked when it is erased in line 7135.


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

https://reviews.llvm.org/D129352



More information about the llvm-commits mailing list