summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-08-24 22:59:52 +0000
committerMatthias Braun <matze@braunis.de>2015-08-24 22:59:52 +0000
commitb2b7ef1de8118095963e1c085467fc411bd7e56f (patch)
tree10da40c76c37d53e59e8197182bd65cfffde9301 /llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
parent008ff14acf9ce39d855dbeeb622e0598bbad0d93 (diff)
downloadbcm5719-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.cpp5
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.
OpenPOWER on IntegriCloud