diff options
Diffstat (limited to 'contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp b/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp index 7f21240..744761b 100644 --- a/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp +++ b/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp @@ -43,7 +43,7 @@ namespace { bool runOnMachineFunction(MachineFunction &Fn) override; - const char *getPassName() const override { + StringRef getPassName() const override { return "ARM MLA / MLS expansion pass"; } @@ -334,18 +334,15 @@ bool MLxExpansion::ExpandFPMLxInstructions(MachineBasicBlock &MBB) { unsigned Skip = 0; MachineBasicBlock::reverse_iterator MII = MBB.rbegin(), E = MBB.rend(); while (MII != E) { - MachineInstr *MI = &*MII; + MachineInstr *MI = &*MII++; - if (MI->isPosition() || MI->isImplicitDef() || MI->isCopy()) { - ++MII; + if (MI->isPosition() || MI->isImplicitDef() || MI->isCopy()) continue; - } const MCInstrDesc &MCID = MI->getDesc(); if (MI->isBarrier()) { clearStack(); Skip = 0; - ++MII; continue; } @@ -365,13 +362,9 @@ bool MLxExpansion::ExpandFPMLxInstructions(MachineBasicBlock &MBB) { pushStack(MI); else { ExpandFPMLxInstruction(MBB, MI, MulOpc, AddSubOpc, NegAcc, HasLane); - E = MBB.rend(); // May have changed if MI was the 1st instruction. Changed = true; - continue; } } - - ++MII; } return Changed; |