[PATCH] D126048: [SplitKit] Handle early clobber + tied to def correctly

ShihPo Hung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 01:04:02 PDT 2022


arcbbb added inline comments.


================
Comment at: llvm/lib/CodeGen/SplitKit.cpp:1381
+        unsigned OpIdx = MI->getOperandNo(MOItr);
+        unsigned DefOpIdx = MI->findTiedOperandIdx(OpIdx);
+        const MachineOperand &DefOp = MI->getOperand(DefOpIdx);
----------------
The logic here looks similar to LiveIntervalCalc::extendToUses that checks for early-clobber redefs.
Can it be simplified with `OpIdx = (&MO - &MI->getOperand(0))` and `MI->isRegTiedToDefOperand(OpIdx, &DefOpIdx)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126048



More information about the llvm-commits mailing list