Lines Matching defs:WLS
10 // Currently it only moves blocks to fix backwards WLS branches.
35 // A list of WLS instructions that need to be reverted to DLS.
47 bool revertWhileToDoLoop(MachineInstr *WLS);
75 /// predecessor. If found, returns (BB, WLS Instr) pair, otherwise a null pair.
90 bool ARMBlockPlacement::revertWhileToDoLoop(MachineInstr *WLS) {
99 MachineBasicBlock *Preheader = WLS->getParent();
100 assert(WLS != &Preheader->back());
101 assert(WLS->getNextNode() == &Preheader->back());
107 WLS->getOperand(1).setIsKill(false);
108 if (WLS->getOpcode() == ARM::t2WhileLoopStartTP)
109 WLS->getOperand(2).setIsKill(false);
122 // Create a new DLS to replace the WLS
124 BuildMI(*NewBlock, Br, WLS->getDebugLoc(),
125 TII->get(WLS->getOpcode() == ARM::t2WhileLoopStartTP
128 MIB.add(WLS->getOperand(0));
129 MIB.add(WLS->getOperand(1));
130 if (WLS->getOpcode() == ARM::t2WhileLoopStartTP)
131 MIB.add(WLS->getOperand(2));
134 << "Reverting While Loop to Do Loop: " << *WLS << "\n");
136 RevertWhileLoopStartLR(WLS, TII, ARM::t2Bcc, true);
148 /// Checks if loop has a backwards branching WLS, and if possible, fixes it.
150 /// for a WLS and if its loopExit/target is before it.
151 /// If moving the predecessor won't convert a WLS (to the predecessor) from
152 /// a forward to a backward branching WLS, then move the predecessor block
167 LLVM_DEBUG(dbgs() << DEBUG_PREFIX << "Found a backwards WLS from "
173 // since bb2's WLS will become forwards once bb3 is moved before/above bb1.
177 // WLS bb3
179 // WLS bb1
189 // moving Preheader even if we'd introduce a backwards WLS
192 << "it would convert a WLS from forward to a "
193 << "backwards branching WLS\n");
204 /// Updates ordering (of WLS BB and their loopExits) in inner loops first
229 // Find loops with a backwards branching WLS and fix if possible.