[PATCH] D89189: [ARM][MachineOutliner] Do not overestimate LR liveness in return block
Yvan Roux via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 06:05:10 PDT 2020
yroux added a comment.
Hi,
Thanks for raising this issue, I've two inlined comments
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:5730-5734
+ if (llvm::any_of(phys_regs_and_masks(MI), [](const MachineOperand &MO) {
+ return (MO.isRegMask() &&
+ MachineOperand::clobbersPhysReg(MO.getRegMask(), ARM::LR)) ||
+ (MO.isReg() && MO.isDef() && MO.getReg() == ARM::LR);
+ }))
----------------
Can't we use MachineInstr::modifiesRegister() here ?
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:5747-5749
+ if (llvm::any_of(phys_regs_and_masks(MI), [](const MachineOperand &MO) {
+ return MO.isReg() && MO.readsReg() && MO.getReg() == ARM::LR;
+ }))
----------------
same question with MachineInstr::readsRegister()
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89189/new/
https://reviews.llvm.org/D89189
More information about the llvm-commits
mailing list