Home
last modified time | relevance | path

Searched refs:UseMI (Results 1 – 25 of 130) sorted by relevance

123456

/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/Hexagon/
DHexagonOptAddrMode.cpp92 bool xformUseMI(MachineInstr *TfrMI, MachineInstr *UseMI,
96 bool updateAddUses(MachineInstr *AddMI, MachineInstr *UseMI);
187 MachineInstr &UseMI = *NodeAddr<StmtNode *>(IA).Addr->getCode(); in canRemoveAddasl() local
191 MI.getParent() != UseMI.getParent()) in canRemoveAddasl()
194 const MCInstrDesc &UseMID = UseMI.getDesc(); in canRemoveAddasl()
196 HII->getAddrMode(UseMI) != HexagonII::BaseImmOffset || in canRemoveAddasl()
197 getBaseWithLongOffset(UseMI) < 0) in canRemoveAddasl()
201 if (UseMID.mayStore() && UseMI.getOperand(2).isReg() && in canRemoveAddasl()
202 UseMI.getOperand(2).getReg() == MI.getOperand(0).getReg()) in canRemoveAddasl()
205 for (auto &Mo : UseMI.operands()) in canRemoveAddasl()
[all …]
/external/llvm/lib/Target/Hexagon/
DHexagonOptAddrMode.cpp78 bool xformUseMI(MachineInstr *TfrMI, MachineInstr *UseMI,
165 MachineInstr *UseMI = NodeAddr<StmtNode *>(IA).Addr->getCode(); in canRemoveAddasl() local
169 MI->getParent() != UseMI->getParent()) in canRemoveAddasl()
172 const MCInstrDesc &UseMID = UseMI->getDesc(); in canRemoveAddasl()
174 HII->getAddrMode(UseMI) != HexagonII::BaseImmOffset || in canRemoveAddasl()
175 getBaseWithLongOffset(UseMI) < 0) in canRemoveAddasl()
179 if (UseMID.mayStore() && UseMI->getOperand(2).isReg() && in canRemoveAddasl()
180 UseMI->getOperand(2).getReg() == MI->getOperand(0).getReg()) in canRemoveAddasl()
183 for (auto &Mo : UseMI->operands()) in canRemoveAddasl()
441 MachineInstr *UseMI = UseIA.Addr->getCode(); in changeAddAsl() local
[all …]
/external/llvm/lib/Target/AMDGPU/
DSIFoldOperands.cpp50 MachineInstr *UseMI; member
56 UseMI(MI), UseOpNo(OpNo) { in FoldCandidate()
101 MachineInstr *MI = Fold.UseMI; in updateOperand()
125 if (Candidate.UseMI == MI) in isUseMIInFoldList()
191 static void foldOperand(MachineOperand &OpToFold, MachineInstr *UseMI, in foldOperand() argument
197 const MachineOperand &UseOp = UseMI->getOperand(UseOpIdx); in foldOperand()
236 if (UseMI->getOpcode() == AMDGPU::COPY) { in foldOperand()
237 unsigned DestReg = UseMI->getOperand(0).getReg(); in foldOperand()
247 UseMI->setDesc(TII->get(MovOp)); in foldOperand()
248 CopiesToReplace.push_back(UseMI); in foldOperand()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DSIFoldOperands.cpp32 MachineInstr *UseMI; member
44 UseMI(MI), OpToFold(nullptr), UseOpNo(OpNo), Kind(FoldOp->getType()), in FoldCandidate()
82 MachineInstr *UseMI,
122 const MachineInstr &UseMI, in isInlineConstantIfFolded() argument
125 if (TII->isInlineConstant(UseMI, OpNo, OpToFold)) in isInlineConstantIfFolded()
128 unsigned Opc = UseMI.getOpcode(); in isInlineConstantIfFolded()
158 MachineInstr *MI = Fold.UseMI; in updateOperand()
218 if (Candidate.UseMI == MI) in isUseMIInFoldList()
313 MachineInstr *UseMI, in foldOperand() argument
317 const MachineOperand &UseOp = UseMI->getOperand(UseOpIdx); in foldOperand()
[all …]
/external/swiftshader/third_party/LLVM/lib/CodeGen/
DTwoAddressInstructionPass.cpp290 static bool isTwoAddrUse(MachineInstr *UseMI, unsigned Reg) { in isTwoAddrUse() argument
291 const MCInstrDesc &MCID = UseMI->getDesc(); in isTwoAddrUse()
293 MachineOperand &MO = UseMI->getOperand(i); in isTwoAddrUse()
295 (MO.isDef() || UseMI->isRegTiedToDefOperand(i))) in isTwoAddrUse()
314 MachineInstr *UseMI = UseMO.getParent(); in isProfitableToReMat() local
315 MachineBasicBlock *UseMBB = UseMI->getParent(); in isProfitableToReMat()
317 DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(UseMI); in isProfitableToReMat()
323 if (isTwoAddrUse(UseMI, Reg)) in isProfitableToReMat()
481 MachineInstr &UseMI = *MRI->use_nodbg_begin(Reg); in findOnlyInterestingUse() local
482 if (UseMI.getParent() != MBB) in findOnlyInterestingUse()
[all …]
DLiveRangeEdit.cpp167 MachineInstr *DefMI = 0, *UseMI = 0; in foldAsLoad() local
181 if (UseMI && UseMI != MI) in foldAsLoad()
186 UseMI = MI; in foldAsLoad()
189 if (!DefMI || !UseMI) in foldAsLoad()
193 << " into single use: " << *UseMI); in foldAsLoad()
196 if (UseMI->readsWritesVirtualRegister(LI->reg, &Ops).second) in foldAsLoad()
199 MachineInstr *FoldMI = TII.foldMemoryOperand(UseMI, Ops, DefMI); in foldAsLoad()
203 LIS.ReplaceMachineInstrInMaps(UseMI, FoldMI); in foldAsLoad()
204 UseMI->eraseFromParent(); in foldAsLoad()
DPeepholeOptimizer.cpp166 MachineInstr *UseMI = &*UI; in OptimizeExtInstr() local
167 if (UseMI == MI) in OptimizeExtInstr()
170 if (UseMI->isPHI()) { in OptimizeExtInstr()
192 if (UseMI->getOpcode() == TargetOpcode::SUBREG_TO_REG) in OptimizeExtInstr()
195 MachineBasicBlock *UseMBB = UseMI->getParent(); in OptimizeExtInstr()
198 if (!LocalMIs.count(UseMI)) in OptimizeExtInstr()
238 MachineInstr *UseMI = UseMO->getParent(); in OptimizeExtInstr() local
239 MachineBasicBlock *UseMBB = UseMI->getParent(); in OptimizeExtInstr()
244 BuildMI(*UseMBB, UseMI, UseMI->getDebugLoc(), in OptimizeExtInstr()
DRegisterScavenging.cpp269 MachineBasicBlock::iterator &UseMI) { in findSurvivorReg() argument
326 UseMI = RestorePointMI; in findSurvivorReg()
355 MachineBasicBlock::iterator UseMI; in scavengeRegister() local
356 unsigned SReg = findSurvivorReg(I, Candidates, 25, UseMI); in scavengeRegister()
372 if (!TRI->saveScavengerRegister(*MBB, I, UseMI, RC, SReg)) { in scavengeRegister()
381 TII->loadRegFromStackSlot(*MBB, UseMI, SReg, ScavengingFrameIndex, RC, TRI); in scavengeRegister()
382 II = prior(UseMI); in scavengeRegister()
386 ScavengeRestore = prior(UseMI); in scavengeRegister()
DRegisterCoalescer.cpp697 MachineInstr *UseMI = &*UI; in RemoveCopyByCommutingDef() local
698 SlotIndex UseIdx = LIS->getInstructionIndex(UseMI); in RemoveCopyByCommutingDef()
702 if (ULR->valno == AValNo && JoinedCopies.count(UseMI)) in RemoveCopyByCommutingDef()
740 MachineInstr *UseMI = &*UI; in RemoveCopyByCommutingDef() local
742 if (JoinedCopies.count(UseMI)) in RemoveCopyByCommutingDef()
744 if (UseMI->isDebugValue()) { in RemoveCopyByCommutingDef()
750 SlotIndex UseIdx = LIS->getInstructionIndex(UseMI).getUseIndex(); in RemoveCopyByCommutingDef()
758 if (UseMI == CopyMI) in RemoveCopyByCommutingDef()
760 if (!UseMI->isCopy()) in RemoveCopyByCommutingDef()
762 if (UseMI->getOperand(0).getReg() != IntB.reg || in RemoveCopyByCommutingDef()
[all …]
DScheduleDAGInstrs.cpp313 MachineInstr *UseMI = UseSU->getInstr(); in BuildSchedGraph() local
314 const MCInstrDesc &UseMCID = UseMI->getDesc(); in BuildSchedGraph()
315 int RegUseIndex = UseMI->findRegisterUseOperandIdx(Reg); in BuildSchedGraph()
355 const MachineInstr *UseMI = UseMO->getParent(); in BuildSchedGraph() local
356 unsigned UseMOIdx = UseMO - &UseMI->getOperand(0); in BuildSchedGraph()
357 const MCInstrDesc &UseMCID = UseMI->getDesc(); in BuildSchedGraph()
365 if (UseMI->getParent() != MI->getParent()) { in BuildSchedGraph()
613 MachineInstr *UseMI = Use->getInstr(); in ComputeOperandLatency() local
616 if (UseMI) { in ComputeOperandLatency()
617 for (unsigned i = 0, e = UseMI->getNumOperands(); i != e; ++i) { in ComputeOperandLatency()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DMachineTraceMetrics.cpp652 static bool getDataDeps(const MachineInstr &UseMI, in getDataDeps() argument
656 if (UseMI.isDebugInstr()) in getDataDeps()
660 for (MachineInstr::const_mop_iterator I = UseMI.operands_begin(), in getDataDeps()
661 E = UseMI.operands_end(); I != E; ++I) { in getDataDeps()
674 Deps.push_back(DataDep(MRI, Reg, UseMI.getOperandNo(I))); in getDataDeps()
682 static void getPHIDeps(const MachineInstr &UseMI, in getPHIDeps() argument
689 assert(UseMI.isPHI() && UseMI.getNumOperands() % 2 && "Bad PHI"); in getPHIDeps()
690 for (unsigned i = 1; i != UseMI.getNumOperands(); i += 2) { in getPHIDeps()
691 if (UseMI.getOperand(i + 1).getMBB() == Pred) { in getPHIDeps()
692 unsigned Reg = UseMI.getOperand(i).getReg(); in getPHIDeps()
[all …]
DLiveRangeEdit.cpp188 MachineInstr *DefMI = nullptr, *UseMI = nullptr; in foldAsLoad() local
200 if (UseMI && UseMI != MI) in foldAsLoad()
205 UseMI = MI; in foldAsLoad()
208 if (!DefMI || !UseMI) in foldAsLoad()
214 LIS.getInstructionIndex(*UseMI))) in foldAsLoad()
224 << " into single use: " << *UseMI); in foldAsLoad()
227 if (UseMI->readsWritesVirtualRegister(LI->reg, &Ops).second) in foldAsLoad()
230 MachineInstr *FoldMI = TII.foldMemoryOperand(*UseMI, Ops, *DefMI, &LIS); in foldAsLoad()
234 LIS.ReplaceMachineInstrInMaps(*UseMI, *FoldMI); in foldAsLoad()
235 UseMI->eraseFromParent(); in foldAsLoad()
DTargetSchedule.cpp187 const MachineInstr *UseMI, unsigned UseOperIdx) const { in computeOperandLatency() argument
194 if (UseMI) { in computeOperandLatency()
196 *UseMI, UseOperIdx); in computeOperandLatency()
226 if (!UseMI) in computeOperandLatency()
230 const MCSchedClassDesc *UseDesc = resolveSchedClass(UseMI); in computeOperandLatency()
233 unsigned UseIdx = findUseIdx(UseMI, UseOperIdx); in computeOperandLatency()
DRegisterScavenging.cpp310 MachineBasicBlock::iterator &UseMI) { in findSurvivorReg() argument
367 UseMI = RestorePointMI; in findSurvivorReg()
463 MachineBasicBlock::iterator &UseMI) { in spill() argument
508 if (!TRI->saveScavengerRegister(*MBB, Before, UseMI, &RC, Reg)) { in spill()
525 TII->loadRegFromStackSlot(*MBB, UseMI, Reg, Scavenged[SI].FrameIndex, in spill()
527 II = std::prev(UseMI); in spill()
559 MachineBasicBlock::iterator UseMI; in scavengeRegister() local
560 unsigned SReg = findSurvivorReg(I, Candidates, 25, UseMI); in scavengeRegister()
568 ScavengedInfo &Scavenged = spill(SReg, *RC, SPAdj, I, UseMI); in scavengeRegister()
569 Scavenged.Restore = &*std::prev(UseMI); in scavengeRegister()
[all …]
DMachineLICM.cpp969 for (MachineInstr &UseMI : MRI->use_instructions(CopyDstReg)) { in isCopyFeedingInvariantStore()
970 if (UseMI.mayStore() && isInvariantStore(UseMI, TRI, MRI)) in isCopyFeedingInvariantStore()
1066 for (MachineInstr &UseMI : MRI->use_instructions(Reg)) { in HasLoopPHIUse()
1068 if (UseMI.isPHI()) { in HasLoopPHIUse()
1071 if (CurLoop->contains(&UseMI)) in HasLoopPHIUse()
1076 if (isExitBlock(UseMI.getParent())) in HasLoopPHIUse()
1081 if (UseMI.isCopy() && CurLoop->contains(&UseMI)) in HasLoopPHIUse()
1082 Work.push_back(&UseMI); in HasLoopPHIUse()
1097 for (MachineInstr &UseMI : MRI->use_nodbg_instructions(Reg)) { in HasHighOperandLatency()
1098 if (UseMI.isCopyLike()) in HasHighOperandLatency()
[all …]
DDetectDeadLanes.cpp424 const MachineInstr &UseMI = *MO.getParent(); in determineInitialUsedLanes() local
425 if (UseMI.isKill()) in determineInitialUsedLanes()
429 if (lowersToCopies(UseMI)) { in determineInitialUsedLanes()
430 assert(UseMI.getDesc().getNumDefs() == 1); in determineInitialUsedLanes()
431 const MachineOperand &Def = *UseMI.defs().begin(); in determineInitialUsedLanes()
438 if (lowersToCopies(UseMI)) { in determineInitialUsedLanes()
440 CrossCopy = isCrossCopy(*MRI, UseMI, DstRC, MO); in determineInitialUsedLanes()
442 LLVM_DEBUG(dbgs() << "Copy across incompatible classes: " << UseMI); in determineInitialUsedLanes()
/external/llvm/lib/CodeGen/
DMachineTraceMetrics.cpp628 static bool getDataDeps(const MachineInstr &UseMI, in getDataDeps() argument
632 if (UseMI.isDebugValue()) in getDataDeps()
636 for (MachineInstr::const_mop_iterator I = UseMI.operands_begin(), in getDataDeps()
637 E = UseMI.operands_end(); I != E; ++I) { in getDataDeps()
650 Deps.push_back(DataDep(MRI, Reg, UseMI.getOperandNo(I))); in getDataDeps()
658 static void getPHIDeps(const MachineInstr &UseMI, in getPHIDeps() argument
665 assert(UseMI.isPHI() && UseMI.getNumOperands() % 2 && "Bad PHI"); in getPHIDeps()
666 for (unsigned i = 1; i != UseMI.getNumOperands(); i += 2) { in getPHIDeps()
667 if (UseMI.getOperand(i + 1).getMBB() == Pred) { in getPHIDeps()
668 unsigned Reg = UseMI.getOperand(i).getReg(); in getPHIDeps()
[all …]
DLiveRangeEdit.cpp166 MachineInstr *DefMI = nullptr, *UseMI = nullptr; in foldAsLoad() local
178 if (UseMI && UseMI != MI) in foldAsLoad()
183 UseMI = MI; in foldAsLoad()
186 if (!DefMI || !UseMI) in foldAsLoad()
192 LIS.getInstructionIndex(*UseMI))) in foldAsLoad()
202 << " into single use: " << *UseMI); in foldAsLoad()
205 if (UseMI->readsWritesVirtualRegister(LI->reg, &Ops).second) in foldAsLoad()
208 MachineInstr *FoldMI = TII.foldMemoryOperand(*UseMI, Ops, *DefMI, &LIS); in foldAsLoad()
212 LIS.ReplaceMachineInstrInMaps(*UseMI, *FoldMI); in foldAsLoad()
213 UseMI->eraseFromParent(); in foldAsLoad()
DTargetSchedule.cpp156 const MachineInstr *UseMI, unsigned UseOperIdx) const { in computeOperandLatency() argument
163 if (UseMI) { in computeOperandLatency()
165 *UseMI, UseOperIdx); in computeOperandLatency()
195 if (!UseMI) in computeOperandLatency()
199 const MCSchedClassDesc *UseDesc = resolveSchedClass(UseMI); in computeOperandLatency()
202 unsigned UseIdx = findUseIdx(UseMI, UseOperIdx); in computeOperandLatency()
DRegisterScavenging.cpp279 MachineBasicBlock::iterator &UseMI) { in findSurvivorReg() argument
336 UseMI = RestorePointMI; in findSurvivorReg()
372 MachineBasicBlock::iterator UseMI; in scavengeRegister() local
373 unsigned SReg = findSurvivorReg(I, Candidates, 25, UseMI); in scavengeRegister()
424 if (!TRI->saveScavengerRegister(*MBB, I, UseMI, RC, SReg)) { in scavengeRegister()
441 TII->loadRegFromStackSlot(*MBB, UseMI, SReg, Scavenged[SI].FrameIndex, in scavengeRegister()
443 II = std::prev(UseMI); in scavengeRegister()
449 Scavenged[SI].Restore = &*std::prev(UseMI); in scavengeRegister()
DDetectDeadLanes.cpp426 const MachineInstr &UseMI = *MO.getParent(); in determineInitialUsedLanes() local
427 if (UseMI.isKill()) in determineInitialUsedLanes()
431 if (lowersToCopies(UseMI)) { in determineInitialUsedLanes()
432 assert(UseMI.getDesc().getNumDefs() == 1); in determineInitialUsedLanes()
433 const MachineOperand &Def = *UseMI.defs().begin(); in determineInitialUsedLanes()
440 if (lowersToCopies(UseMI)) { in determineInitialUsedLanes()
442 CrossCopy = isCrossCopy(*MRI, UseMI, DstRC, MO); in determineInitialUsedLanes()
444 DEBUG(dbgs() << "Copy accross incompatible classes: " << UseMI); in determineInitialUsedLanes()
DRegisterCoalescer.cpp703 MachineInstr *UseMI = MO.getParent(); in removeCopyByCommutingDef() local
704 unsigned OpNo = &MO - &UseMI->getOperand(0); in removeCopyByCommutingDef()
705 SlotIndex UseIdx = LIS->getInstructionIndex(*UseMI); in removeCopyByCommutingDef()
710 if (UseMI->isRegTiedToDefOperand(OpNo)) in removeCopyByCommutingDef()
752 MachineInstr *UseMI = UseMO.getParent(); in removeCopyByCommutingDef() local
753 if (UseMI->isDebugValue()) { in removeCopyByCommutingDef()
759 SlotIndex UseIdx = LIS->getInstructionIndex(*UseMI).getRegSlot(true); in removeCopyByCommutingDef()
770 if (UseMI == CopyMI) in removeCopyByCommutingDef()
772 if (!UseMI->isCopy()) in removeCopyByCommutingDef()
774 if (UseMI->getOperand(0).getReg() != IntB.reg || in removeCopyByCommutingDef()
[all …]
/external/swiftshader/third_party/LLVM/lib/Target/ARM/
DMLxExpansionPass.cpp121 MachineInstr *UseMI = &*MRI->use_nodbg_begin(Reg); in getDefReg() local
122 if (UseMI->getParent() != MBB) in getDefReg()
125 while (UseMI->isCopy() || UseMI->isInsertSubreg()) { in getDefReg()
126 Reg = UseMI->getOperand(0).getReg(); in getDefReg()
130 UseMI = &*MRI->use_nodbg_begin(Reg); in getDefReg()
131 if (UseMI->getParent() != MBB) in getDefReg()
/external/llvm/lib/Target/ARM/
DMLxExpansionPass.cpp124 MachineInstr *UseMI = &*MRI->use_instr_nodbg_begin(Reg); in getDefReg() local
125 if (UseMI->getParent() != MBB) in getDefReg()
128 while (UseMI->isCopy() || UseMI->isInsertSubreg()) { in getDefReg()
129 Reg = UseMI->getOperand(0).getReg(); in getDefReg()
133 UseMI = &*MRI->use_instr_nodbg_begin(Reg); in getDefReg()
134 if (UseMI->getParent() != MBB) in getDefReg()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/ARM/
DMLxExpansionPass.cpp124 MachineInstr *UseMI = &*MRI->use_instr_nodbg_begin(Reg); in getDefReg() local
125 if (UseMI->getParent() != MBB) in getDefReg()
128 while (UseMI->isCopy() || UseMI->isInsertSubreg()) { in getDefReg()
129 Reg = UseMI->getOperand(0).getReg(); in getDefReg()
133 UseMI = &*MRI->use_instr_nodbg_begin(Reg); in getDefReg()
134 if (UseMI->getParent() != MBB) in getDefReg()

123456