summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-10-25 02:55:17 +0000
committerMatthias Braun <matze@braunis.de>2016-10-25 02:55:17 +0000
commitc8440dddb25dac3da5574f94ed267e9d2183c57e (patch)
tree8d2649fd8bddfb216b08bd7e83d96d60de7c23e5 /llvm/lib/CodeGen
parentca7664e761c68f9b77b39ad589bdc8c58ad61e0f (diff)
downloadbcm5719-llvm-c8440dddb25dac3da5574f94ed267e9d2183c57e.tar.gz
bcm5719-llvm-c8440dddb25dac3da5574f94ed267e9d2183c57e.zip
MachineInstrBundle: Pass iterators to getBundle(Start|End); NFC
This is a function to go backwards in a block to find the first instruction in a bundle, so iterator is a more natural choice for parameter/return rather than a reference to a MachineInstruction. llvm-svn: 285051
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAGInstrs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
index ba9bf906294..b968260090a 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -1222,7 +1222,7 @@ static void toggleBundleKillFlag(MachineInstr *MI, unsigned Reg,
// might set it on too many operands. We will clear as many flags as we
// can though.
MachineBasicBlock::instr_iterator Begin = MI->getIterator();
- MachineBasicBlock::instr_iterator End = getBundleEnd(*MI);
+ MachineBasicBlock::instr_iterator End = getBundleEnd(Begin);
while (Begin != End) {
if (NewKillState) {
if ((--End)->addRegisterKilled(Reg, TRI, /* addIfNotFound= */ false))
@@ -1344,7 +1344,7 @@ void ScheduleDAGInstrs::fixupKills(MachineBasicBlock *MBB) {
DEBUG({
if (MI.getOpcode() == TargetOpcode::BUNDLE) {
MachineBasicBlock::instr_iterator Begin = MI.getIterator();
- MachineBasicBlock::instr_iterator End = getBundleEnd(MI);
+ MachineBasicBlock::instr_iterator End = getBundleEnd(Begin);
while (++Begin != End)
DEBUG(Begin->dump());
}
OpenPOWER on IntegriCloud