Home | History | Annotate | Download | only in Mips

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."),
190 class Filler : public MachineFunctionPass {
192 Filler(TargetMachine &tm)
196 return "Mips Delay Slot Filler";
241 IterTy &Filler) const;
277 char Filler::ID = 0;
284 /// This function inserts clones of Filler into predecessor blocks.
285 static void insertDelayFiller(Iter Filler, const BB2BrMap &BrMap) {
286 MachineFunction *MF = Filler->getParent()->getParent();
290 MIBundleBuilder(I->second).append(MF->CloneMachineInstr(&*Filler));
293 I->first->insert(I->first->end(), MF->CloneMachineInstr(&*Filler));
298 /// This function adds registers Filler defines to MBB's live-in register list.
299 static void addLiveInRegs(Iter Filler, MachineBasicBlock &MBB) {
300 for (unsigned I = 0, E = Filler->getNumOperands(); I != E; ++I) {
301 const MachineOperand &MO = Filler->getOperand(I);
532 Iter Filler::replaceWithCompactBranch(MachineBasicBlock &MBB, Iter Branch,
565 bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) {
642 return new Filler(tm);
646 bool Filler::searchRange(MachineBasicBlock &MBB, IterTy Begin, IterTy End,
648 IterTy &Filler) const {
700 Filler = CurrI;
707 bool Filler::searchBackward(MachineBasicBlock &MBB, Iter Slot) const {
714 ReverseIter Filler;
719 Filler))
722 MBB.splice(std::next(Slot), &MBB, std::next(Filler).base());
728 bool Filler::searchForward(MachineBasicBlock &MBB, Iter Slot) const {
735 Iter Filler;
739 if (!searchRange(MBB, std::next(Slot), MBB.end(), RegDU, NM, Slot, Filler))
742 MBB.splice(std::next(Slot), &MBB, Filler);
748 bool Filler::searchSuccBBs(MachineBasicBlock &MBB, Iter Slot) const {
761 Iter Filler;
784 Filler))
787 insertDelayFiller(Filler, BrMap);
788 addLiveInRegs(Filler, *SuccBB);
789 Filler->eraseFromParent();
794 MachineBasicBlock *Filler::selectSuccBB(MachineBasicBlock &B) const {
810 Filler::getBranch(MachineBasicBlock &MBB, const MachineBasicBlock &Dst) const {
845 bool Filler::examinePred(MachineBasicBlock &Pred, const MachineBasicBlock &Succ,
866 bool Filler::delayHasHazard(const MachineInstr &Candidate, RegDefsUses &RegDU,
879 bool Filler::terminateSearch(const MachineInstr &Candidate) const {