diff options
author | Matthias Braun <matze@braunis.de> | 2015-08-24 22:59:52 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-08-24 22:59:52 +0000 |
commit | b2b7ef1de8118095963e1c085467fc411bd7e56f (patch) | |
tree | 10da40c76c37d53e59e8197182bd65cfffde9301 /llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | |
parent | 008ff14acf9ce39d855dbeeb622e0598bbad0d93 (diff) | |
download | bcm5719-llvm-b2b7ef1de8118095963e1c085467fc411bd7e56f.tar.gz bcm5719-llvm-b2b7ef1de8118095963e1c085467fc411bd7e56f.zip |
MachineBasicBlock: Add liveins() method returning an iterator_range
llvm-svn: 245895
Diffstat (limited to 'llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index 39c259d7c79..8bb548228c2 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -110,9 +110,8 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { // block. for (MachineBasicBlock::succ_iterator S = MBB.succ_begin(), E = MBB.succ_end(); S != E; S++) - for (MachineBasicBlock::livein_iterator LI = (*S)->livein_begin(); - LI != (*S)->livein_end(); LI++) - LivePhysRegs.set(*LI); + for (unsigned LI : (*S)->liveins()) + LivePhysRegs.set(LI); // Now scan the instructions and delete dead ones, tracking physreg // liveness as we go. |