Home | History | Annotate | Download | only in Mips

Lines Matching refs:Filler

1 //===-- MipsDelaySlotFiller.cpp - Mips Delay Slot Filler ------------------===//
14 #define DEBUG_TYPE "delay-slot-filler"
40 "disable-mips-delay-filler",
48 cl::desc("Disallow MIPS delay filler to search forward."),
54 cl::desc("Disallow MIPS delay filler to search successor basic blocks."),
60 cl::desc("Disallow MIPS delay filler to search backward."),
177 class Filler : public MachineFunctionPass {
179 Filler(TargetMachine &tm)
183 return "Mips Delay Slot Filler";
213 IterTy &Filler) const;
249 char Filler::ID = 0;
256 /// This function inserts clones of Filler into predecessor blocks.
257 static void insertDelayFiller(Iter Filler, const BB2BrMap &BrMap) {
258 MachineFunction *MF = Filler->getParent()->getParent();
262 MIBundleBuilder(I->second).append(MF->CloneMachineInstr(&*Filler));
265 I->first->insert(I->first->end(), MF->CloneMachineInstr(&*Filler));
270 /// This function adds registers Filler defines to MBB's live-in register list.
271 static void addLiveInRegs(Iter Filler, MachineBasicBlock &MBB) {
272 for (unsigned I = 0, E = Filler->getNumOperands(); I != E; ++I) {
273 const MachineOperand &MO = Filler->getOperand(I);
492 bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) {
528 return new Filler(tm);
532 bool Filler::searchRange(MachineBasicBlock &MBB, IterTy Begin, IterTy End,
534 IterTy &Filler) const {
549 Filler = I;
556 bool Filler::searchBackward(MachineBasicBlock &MBB, Iter Slot) const {
562 ReverseIter Filler;
566 if (searchRange(MBB, ReverseIter(Slot), MBB.rend(), RegDU, MemDU, Filler)) {
567 MBB.splice(llvm::next(Slot), &MBB, llvm::next(Filler).base());
576 bool Filler::searchForward(MachineBasicBlock &MBB, Iter Slot) const {
583 Iter Filler;
587 if (searchRange(MBB, llvm::next(Slot), MBB.end(), RegDU, NM, Filler)) {
588 MBB.splice(llvm::next(Slot), &MBB, Filler);
597 bool Filler::searchSuccBBs(MachineBasicBlock &MBB, Iter Slot) const {
610 Iter Filler;
631 if (!searchRange(MBB, SuccBB->begin(), SuccBB->end(), RegDU, *IM, Filler))
634 insertDelayFiller(Filler, BrMap);
635 addLiveInRegs(Filler, *SuccBB);
636 Filler->eraseFromParent();
641 MachineBasicBlock *Filler::selectSuccBB(MachineBasicBlock &B) const {
652 Filler::getBranch(MachineBasicBlock &MBB, const MachineBasicBlock &Dst) const {
687 bool Filler::examinePred(MachineBasicBlock &Pred, const MachineBasicBlock &Succ,
708 bool Filler::delayHasHazard(const MachineInstr &Candidate, RegDefsUses &RegDU,
718 bool Filler::terminateSearch(const MachineInstr &Candidate) const {