[PATCH] D85659: [PowerPC] in fixupIsDeadOrKill before RA, get def instructions by calling getVRegDef
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 16 19:49:38 PDT 2020
lkail accepted this revision.
lkail added a comment.
This revision is now accepted and ready to land.
LGTM with nits.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:2676
+ // real def. See function getForwardingDefMI.
+ if (MRI.isSSA() && StartMI->findRegisterUseOperandIdx(RegNo) < 0 &&
+ StartMI->findRegisterDefOperandIdx(RegNo) < 0) {
----------------
nit: `findRegisterUseOperandIdx(RegNo) < 0` -> `readsRegister(RegNo)`
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.h:577
/// analysis post-RA, \p StartMI and \p EndMI are hard to keep right.
- void fixupIsDeadOrKill(MachineInstr &StartMI, MachineInstr &EndMI,
+ void fixupIsDeadOrKill(MachineInstr *StartMI, MachineInstr *EndMI,
unsigned RegNo) const;
----------------
Could you add more comment about the fact `StartMI` might be altered?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85659/new/
https://reviews.llvm.org/D85659
More information about the llvm-commits
mailing list