[PATCH] D44958: [PostRASink]Add register dependency check for implicit operands
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 07:35:45 PDT 2018
junbuml added a comment.
> Even without LiveRegUnits, I think you could replace ModifiedRegs and UsedRegs to be ModifiedRegUnits and UsedRegUnits, and use MCRegUnitIterators to check if registers alias.
> I'm ok to commit this and follow-up in separate patches for the rest. Thanks!
Make sense to me. I will do this in a separate patch.
================
Comment at: lib/CodeGen/MachineSink.cpp:1126
- unsigned DefReg = MI->getOperand(0).getReg();
- unsigned SrcReg = MI->getOperand(1).getReg();
+ SmallVector<std::pair<unsigned, unsigned>, 2> UsedRegsInCopy;
+ SmallVector<unsigned, 2> DefedRegsInCopy;
----------------
thegameg wrote:
> Any particular reason why we need to store both the register and the operand idx?
The operand idx will be used in clearKillFlags() to set the kill flag in src reg of the Copy sunk if the src reg is killed in an instruction placed between Copy and the end of the block.
https://reviews.llvm.org/D44958
More information about the llvm-commits
mailing list