Lines Matching defs:Header
324 MachineBasicBlock *Header = L->getHeader();
327 if (!Header || !Preheader || !Latch)
343 for (instr_iterator I = Header->instr_begin(), E = Header->instr_end();
486 MachineBasicBlock *Header = L->getHeader();
488 // the header. Otherwise, branch to TB could be exiting the loop, and
489 // the fall through can go to the header.
491 assert ((!FB || TB == Header || FB == Header) && "Branches not to header?");
492 if (!TB || (FB && TB != Header && FB != Header))
497 // If TB is not the header, it means that the "not-taken" path must lead
498 // to the header.
499 bool Negated = (Cond.size() > 1) ^ (TB != Header);
594 if (!MDT->properlyDominates(DefBB, Header))
601 if (!MDT->properlyDominates(DefBB, Header))
986 assert(L->getHeader() && "Loop without a header?");
1054 // the header, but is not the header itself.
1245 MachineBasicBlock *Header = L->getHeader();
1249 if (!Header || !Preheader || !Latch)
1265 for (instr_iterator I = Header->instr_begin(), E = Header->instr_end();
1306 if (TB != Header && FB != Header)
1307 // The latch does not go back to the header. Not a latch we know and love.
1418 MachineBasicBlock *Header = L->getHeader();
1420 MachineFunction *MF = Header->getParent();
1423 if (!Latch || Header->hasAddressTaken())
1431 MBBVector Preds(Header->pred_begin(), Header->pred_end());
1448 MF->insert(Header, NewPH);
1450 if (Header->pred_size() > 2) {
1451 // Ensure that the header has only two predecessors: the preheader and
1452 // the loop latch. Any additional predecessors of the header should
1454 // header and create appropriate corresponding PHI nodes in the preheader.
1456 for (instr_iterator I = Header->instr_begin(), E = Header->instr_end();
1469 // Copy all non-latch operands of a header's PHI node to the newly
1495 assert(Header->pred_size() == 2);
1497 // The header has only two predecessors, but the non-latch predecessor
1500 // all we need is to adjust existing PHIs in the header to now refer to
1502 for (instr_iterator I = Header->instr_begin(), E = Header->instr_end();
1514 // If any of the predecessors falls through to the header, insert a branch
1528 if (TB != Header && (Tmp2.empty() || FB != Header))
1530 PB->ReplaceUsesOfBlockWith(Header, NewPH);
1534 // It can happen that the latch block will fall through into the header.
1535 // Insert an unconditional branch to the header.
1541 TII->InsertBranch(*Latch, Header, nullptr, EmptyCond, DL);
1543 // Finally, the branch from the preheader to the header.
1544 TII->InsertBranch(*NewPH, Header, nullptr, EmptyCond, DL);
1545 NewPH->addSuccessor(Header);