diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-02 23:52:57 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-02 23:52:57 +0000 |
commit | 478a8a02bc0f2e739ed8f4240152e99837e480b9 (patch) | |
tree | 47ab92f4d7d9d548d79b78837040b3da3ccba482 /lib/CodeGen | |
parent | 2e5b88e3cbb9438b5b9d3a1dc499b11a144ca7d2 (diff) | |
download | llvm-478a8a02bc0f2e739ed8f4240152e99837e480b9.tar.gz llvm-478a8a02bc0f2e739ed8f4240152e99837e480b9.tar.bz2 llvm-478a8a02bc0f2e739ed8f4240152e99837e480b9.tar.xz |
Require non-NULL register masks.
It doesn't seem worthwhile to give meaning to a NULL register mask
pointer. It complicates all the code using register mask operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/DeadMachineInstructionElim.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 5 |
3 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/DeadMachineInstructionElim.cpp b/lib/CodeGen/DeadMachineInstructionElim.cpp index aeb0b3ed02..020b64d883 100644 --- a/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -175,10 +175,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { } } else if (MO.isRegMask()) { // Register mask of preserved registers. All clobbers are dead. - if (const uint32_t *Mask = MO.getRegMask()) - LivePhysRegs.clearBitsNotInMask(Mask); - else - LivePhysRegs.reset(); + LivePhysRegs.clearBitsNotInMask(MO.getRegMask()); LivePhysRegs |= ReservedRegs; } } diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index c281cd1149..7cf282c25c 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -327,7 +327,7 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const { OS << '>'; break; case MachineOperand::MO_RegisterMask: - OS << (getRegMask() ? "<regmask>" : "<regmask:null>"); + OS << "<regmask>"; break; case MachineOperand::MO_Metadata: OS << '<'; diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 49a109e252..9b058c3416 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -417,10 +417,7 @@ void MachineLICM::ProcessMI(MachineInstr *MI, // We can't hoist an instruction defining a physreg that is clobbered in // the loop. if (MO.isRegMask()) { - if (const uint32_t *Mask = MO.getRegMask()) - PhysRegClobbers.setBitsNotInMask(Mask); - else - PhysRegClobbers.set(); + PhysRegClobbers.setBitsNotInMask(MO.getRegMask()); continue; } |