Lines Matching defs:Filler
1 //===-- MipsDelaySlotFiller.cpp - Mips Delay Slot Filler ------------------===//
35 #define DEBUG_TYPE "delay-slot-filler"
42 "disable-mips-delay-filler",
50 cl::desc("Disallow MIPS delay filler to search forward."),
56 cl::desc("Disallow MIPS delay filler to search successor basic blocks."),
62 cl::desc("Disallow MIPS delay filler to search backward."),
168 class Filler : public MachineFunctionPass {
170 Filler(TargetMachine &tm)
174 return "Mips Delay Slot Filler";
217 IterTy &Filler) const;
253 char Filler::ID = 0;
260 /// This function inserts clones of Filler into predecessor blocks.
261 static void insertDelayFiller(Iter Filler, const BB2BrMap &BrMap) {
262 MachineFunction *MF = Filler->getParent()->getParent();
266 MIBundleBuilder(I->second).append(MF->CloneMachineInstr(&*Filler));
269 I->first->insert(I->first->end(), MF->CloneMachineInstr(&*Filler));
274 /// This function adds registers Filler defines to MBB's live-in register list.
275 static void addLiveInRegs(Iter Filler, MachineBasicBlock &MBB) {
276 for (unsigned I = 0, E = Filler->getNumOperands(); I != E; ++I) {
277 const MachineOperand &MO = Filler->getOperand(I);
508 Iter Filler::replaceWithCompactBranch(MachineBasicBlock &MBB,
531 Iter Filler::replaceWithCompactJump(MachineBasicBlock &MBB,
569 bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) {
646 return new Filler(tm);
650 bool Filler::searchRange(MachineBasicBlock &MBB, IterTy Begin, IterTy End,
652 IterTy &Filler) const {
704 Filler = CurrI;
711 bool Filler::searchBackward(MachineBasicBlock &MBB, Iter Slot) const {
718 ReverseIter Filler;
723 Filler))
726 MBB.splice(std::next(Slot), &MBB, std::next(Filler).base());
732 bool Filler::searchForward(MachineBasicBlock &MBB, Iter Slot) const {
739 Iter Filler;
743 if (!searchRange(MBB, std::next(Slot), MBB.end(), RegDU, NM, Slot, Filler))
746 MBB.splice(std::next(Slot), &MBB, Filler);
752 bool Filler::searchSuccBBs(MachineBasicBlock &MBB, Iter Slot) const {
765 Iter Filler;
788 Filler))
791 insertDelayFiller(Filler, BrMap);
792 addLiveInRegs(Filler, *SuccBB);
793 Filler->eraseFromParent();
798 MachineBasicBlock *Filler::selectSuccBB(MachineBasicBlock &B) const {
814 Filler::getBranch(MachineBasicBlock &MBB, const MachineBasicBlock &Dst) const {
849 bool Filler::examinePred(MachineBasicBlock &Pred, const MachineBasicBlock &Succ,
870 bool Filler::delayHasHazard(const MachineInstr &Candidate, RegDefsUses &RegDU,
883 bool Filler::terminateSearch(const MachineInstr &Candidate) const {