[PATCH] D26111: AArch64: Schedule DeadRegisterDefinitionsPass before regalloc.
Geoff Berry via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 12:43:21 PST 2016
gberry added a comment.
This mostly looks good to me, though I have a few questions below.
================
Comment at: lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp:92
+ continue;
+ // We should not have any relevant physreg defs that are replacable by
+ // zero before register allocation. So we just check for dead vreg defs.
----------------
Perhaps you could add an assert here checking this?
================
Comment at: lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp:96
+ if (!TargetRegisterInfo::isVirtualRegister(Reg) ||
+ (!MO.isDead() && !MRI->use_nodbg_empty(Reg)))
continue;
----------------
Is this use_nodbg_empty check necessary? Can we end up with virtual registers marked dead with dbg uses?
================
Comment at: lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp:148
TRI = MF.getSubtarget().getRegisterInfo();
- bool Changed = false;
DEBUG(dbgs() << "***** AArch64DeadRegisterDefinitions *****\n");
----------------
Perhaps you should commit this bug fix (local Changed shadowing the member) separately?
https://reviews.llvm.org/D26111
More information about the llvm-commits
mailing list