[PATCH] D45695: [CodeGen] Use RegUnits to track register aliases (NFC)
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 08:15:34 PDT 2018
junbuml added a comment.
> Have you seen LiveRegUnits::accumulate() glancing over the code here (and earlier) it seems to me that TII::tracksRegDefsUses() was just invented to do the same thing: figuring out which registers are free/usable over a range of instructions...
Yes, actually my current change in TII::tracksRegDefsUses() was inspired by LiveRegUnits::accumulate(). The only difference is that we need to track UsedRegs and DefReg separately in TII::tracksRegDefsUses(), while LiveRegUnits::accumulate() track both used/defed registers together. Based on your comment in https://reviews.llvm.org/D41463#inline-400109, would it make sense to introduce new static member function in LiveRegUnits like :
static void LiveRegUnits::accumulateUseDef(MachineInstr &MI, LiveRegUnits &ModifiedRegUnits, LiveRegUnits &UsedRegUnits) ?
https://reviews.llvm.org/D45695
More information about the llvm-commits
mailing list