Lines Matching refs:LoadInst

102   void breakBlockedCopies(MachineInstr *LoadInst, MachineInstr *StoreInst,
105 void buildCopies(int Size, MachineInstr *LoadInst, int64_t LdDispImm,
109 void buildCopy(MachineInstr *LoadInst, unsigned NLoadOpcode, int64_t LoadDisp,
339 findPotentialBlockers(MachineInstr *LoadInst) { in findPotentialBlockers() argument
343 for (auto PBInst = std::next(MachineBasicBlock::reverse_iterator(LoadInst)), in findPotentialBlockers()
344 E = LoadInst->getParent()->rend(); in findPotentialBlockers()
361 MachineBasicBlock *MBB = LoadInst->getParent(); in findPotentialBlockers()
380 void X86AvoidSFBPass::buildCopy(MachineInstr *LoadInst, unsigned NLoadOpcode, in buildCopy() argument
385 MachineOperand &LoadBase = getBaseOperand(LoadInst); in buildCopy()
387 MachineBasicBlock *MBB = LoadInst->getParent(); in buildCopy()
388 MachineMemOperand *LMMO = *LoadInst->memoperands_begin(); in buildCopy()
394 BuildMI(*MBB, LoadInst, LoadInst->getDebugLoc(), TII->get(NLoadOpcode), in buildCopy()
411 if (PrevInstrIt.getNodePtr() == LoadInst) in buildCopy()
412 StInst = LoadInst; in buildCopy()
431 void X86AvoidSFBPass::buildCopies(int Size, MachineInstr *LoadInst, in buildCopies() argument
438 if ((Size - MOV128SZ >= 0) && isYMMLoadOpcode(LoadInst->getOpcode())) { in buildCopies()
440 buildCopy(LoadInst, getYMMtoXMMLoadOpcode(LoadInst->getOpcode()), LdDisp, in buildCopies()
451 buildCopy(LoadInst, X86::MOV64rm, LdDisp, StoreInst, X86::MOV64mr, StDisp, in buildCopies()
461 buildCopy(LoadInst, X86::MOV32rm, LdDisp, StoreInst, X86::MOV32mr, StDisp, in buildCopies()
471 buildCopy(LoadInst, X86::MOV16rm, LdDisp, StoreInst, X86::MOV16mr, StDisp, in buildCopies()
481 buildCopy(LoadInst, X86::MOV8rm, LdDisp, StoreInst, X86::MOV8mr, StDisp, in buildCopies()
493 static void updateKillStatus(MachineInstr *LoadInst, MachineInstr *StoreInst) { in updateKillStatus() argument
494 MachineOperand &LoadBase = getBaseOperand(LoadInst); in updateKillStatus()
498 LoadInst->getParent()->instr_begin()) in updateKillStatus()
501 MachineInstr *LastLoad = LoadInst->getPrevNode(); in updateKillStatus()
506 if (StorePrevNonDbgInstr == LoadInst) in updateKillStatus()
507 LastLoad = LoadInst->getPrevNode()->getPrevNode(); in updateKillStatus()
512 if (StorePrevNonDbgInstr == LoadInst) in updateKillStatus()
513 StInst = LoadInst; in updateKillStatus()
556 unsigned X86AvoidSFBPass::getRegSizeInBytes(MachineInstr *LoadInst) { in getRegSizeInBytes() argument
557 const auto *TRC = TII->getRegClass(TII->get(LoadInst->getOpcode()), 0, TRI, in getRegSizeInBytes()
558 *LoadInst->getParent()->getParent()); in getRegSizeInBytes()
563 MachineInstr *LoadInst, MachineInstr *StoreInst, in breakBlockedCopies() argument
565 int64_t LdDispImm = getDispOperand(LoadInst).getImm(); in breakBlockedCopies()
593 buildCopies(Size1, LoadInst, LdDisp1, StoreInst, StDisp1, LMMOffset, in breakBlockedCopies()
596 buildCopies(Size2, LoadInst, LdDisp2, StoreInst, StDisp2, LMMOffset + Size1, in breakBlockedCopies()
603 unsigned Size3 = (LdDispImm + getRegSizeInBytes(LoadInst)) - LdDisp1; in breakBlockedCopies()
604 buildCopies(Size3, LoadInst, LdDisp1, StoreInst, StDisp1, LMMOffset, in breakBlockedCopies()
608 static bool hasSameBaseOpValue(MachineInstr *LoadInst, in hasSameBaseOpValue() argument
610 const MachineOperand &LoadBase = getBaseOperand(LoadInst); in hasSameBaseOpValue()
679 MachineInstr *LoadInst = LoadStoreInstPair.first; in runOnMachineFunction() local
680 int64_t LdDispImm = getDispOperand(LoadInst).getImm(); in runOnMachineFunction()
684 findPotentialBlockers(LoadInst); in runOnMachineFunction()
687 LoadInst->getOpcode()) || in runOnMachineFunction()
696 if (hasSameBaseOpValue(LoadInst, PBInst) && in runOnMachineFunction()
697 isBlockingStore(LdDispImm, getRegSizeInBytes(LoadInst), PBstDispImm, in runOnMachineFunction()
711 LLVM_DEBUG(LoadInst->dump()); in runOnMachineFunction()
715 breakBlockedCopies(LoadInst, StoreInst, BlockingStoresDispSizeMap); in runOnMachineFunction()
716 updateKillStatus(LoadInst, StoreInst); in runOnMachineFunction()
717 ForRemoval.push_back(LoadInst); in runOnMachineFunction()