diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-01 20:36:54 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-01 20:36:54 +0000 |
commit | 92a0083944c2ac5ab5b7b54d88113f41862eaaef (patch) | |
tree | 80e6295842a883a4d1fdcc735dd7963fe6e5abfc /llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | |
parent | e5476db2d8627a82b9af6fc2f153a3f130f0e770 (diff) | |
download | bcm5719-llvm-92a0083944c2ac5ab5b7b54d88113f41862eaaef.tar.gz bcm5719-llvm-92a0083944c2ac5ab5b7b54d88113f41862eaaef.zip |
Switch some getAliasSet clients to MCRegAliasIterator.
MCRegAliasIterator can optionally visit the register itself, allowing
for simpler code.
llvm-svn: 157837
Diffstat (limited to 'llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index aa10d1d41f2..69bd1c24ebc 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -187,10 +187,8 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { if (MO.isReg() && MO.isUse()) { unsigned Reg = MO.getReg(); if (TargetRegisterInfo::isPhysicalRegister(Reg)) { - LivePhysRegs.set(Reg); - for (const uint16_t *AliasSet = TRI->getAliasSet(Reg); - *AliasSet; ++AliasSet) - LivePhysRegs.set(*AliasSet); + for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) + LivePhysRegs.set(*AI); } } } |