CodeGen: Cleanup regmask construction; NFC

- Avoid duplication of regmask size calculation.
- Simplify allocateRegisterMask() call.
- Rename allocateRegisterMask() to allocateRegMask() to be consistent
  with naming in MachineOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun
2018-07-26 00:27:47 +00:00
parent 12c27f5b53
commit ee571f2b41
7 changed files with 21 additions and 18 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ void StackMapLiveness::addLiveOutSetToMI(MachineFunction &MF,
/// register live set.
uint32_t *StackMapLiveness::createRegisterMask(MachineFunction &MF) const {
// The mask is owned and cleaned up by the Machine Function.
uint32_t *Mask = MF.allocateRegisterMask(TRI->getNumRegs());
uint32_t *Mask = MF.allocateRegMask();
for (auto Reg : LiveRegs)
Mask[Reg / 32] |= 1U << (Reg % 32);