summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-20 00:46:39 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-20 00:46:39 +0000
commita72c6e25ec815b11a78c1b9bd32ab1e77b8244e5 (patch)
tree7daf356769a1f6ada3337ffedb3cfaa7589f3a84 /llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
parent3b0177c542c22ee161e469e39fcb2fa1dc4f193e (diff)
downloadbcm5719-llvm-a72c6e25ec815b11a78c1b9bd32ab1e77b8244e5.tar.gz
bcm5719-llvm-a72c6e25ec815b11a78c1b9bd32ab1e77b8244e5.zip
Hexagon: Remove implicit ilist iterator conversions, NFC
There are two things out of the ordinary in this commit. First, I made a loop obviously "infinite" in HexagonInstrInfo.cpp. After checking if an instruction was at the beginning of a basic block (in which case, `break`), the loop decremented and checked the iterator for `nullptr` as the loop condition. This has never been possible (the prev pointers are always been circular, so even with the weird ilist/iplist implementation, this isn't been possible), so I removed the condition. Second, in HexagonAsmPrinter.cpp there was another case of comparing a `MachineBasicBlock::instr_iterator` against `MachineBasicBlock::end()` (which returns `MachineBasicBlock::iterator`). While not incorrect, it's fragile. I switched this to `::instr_end()`. All that said, no functionality change intended here. llvm-svn: 250778
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp b/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
index e4c8d8f7b28..6e2dbc06b12 100644
--- a/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
@@ -74,7 +74,7 @@ bool HexagonExpandPredSpillCode::runOnMachineFunction(MachineFunction &Fn) {
// Loop over all of the basic blocks.
for (MachineFunction::iterator MBBb = Fn.begin(), MBBe = Fn.end();
MBBb != MBBe; ++MBBb) {
- MachineBasicBlock* MBB = MBBb;
+ MachineBasicBlock *MBB = &*MBBb;
// Traverse the basic block.
for (MachineBasicBlock::iterator MII = MBB->begin(); MII != MBB->end();
++MII) {
OpenPOWER on IntegriCloud