Home
last modified time | relevance | path

Searched refs:NewReg (Results 1 – 25 of 73) sorted by relevance

123

/external/llvm/lib/Target/WebAssembly/
DWebAssemblyPeephole.cpp58 static bool MaybeRewriteToDrop(unsigned OldReg, unsigned NewReg, in MaybeRewriteToDrop() argument
62 if (OldReg == NewReg) { in MaybeRewriteToDrop()
64 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(OldReg)); in MaybeRewriteToDrop() local
65 MO.setReg(NewReg); in MaybeRewriteToDrop()
67 MFI.stackifyVReg(NewReg); in MaybeRewriteToDrop()
91 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in MaybeRewriteToFallthrough() local
92 BuildMI(MBB, MI, MI.getDebugLoc(), TII.get(CopyLocalOpc), NewReg) in MaybeRewriteToFallthrough()
94 MO.setReg(NewReg); in MaybeRewriteToFallthrough()
95 MFI.stackifyVReg(NewReg); in MaybeRewriteToFallthrough()
136 unsigned NewReg = in runOnMachineFunction() local
[all …]
DWebAssemblyRegStackify.cpp452 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in MoveForSingleUse() local
453 Def->getOperand(0).setReg(NewReg); in MoveForSingleUse()
454 Op.setReg(NewReg); in MoveForSingleUse()
457 LIS.createAndComputeVirtRegInterval(NewReg); in MoveForSingleUse()
465 MFI.stackifyVReg(NewReg); in MoveForSingleUse()
484 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in RematerializeCheapDef() local
485 TII->reMaterialize(MBB, Insert, NewReg, 0, Def, *TRI); in RematerializeCheapDef()
486 Op.setReg(NewReg); in RematerializeCheapDef()
489 LIS.createAndComputeVirtRegInterval(NewReg); in RematerializeCheapDef()
490 MFI.stackifyVReg(NewReg); in RematerializeCheapDef()
/external/llvm/lib/CodeGen/
DCriticalAntiDepBreaker.cpp333 unsigned NewReg) in isNewRegClobberedByRefs() argument
349 if (CheckOper.isRegMask() && CheckOper.clobbersPhysReg(NewReg)) in isNewRegClobberedByRefs()
353 CheckOper.getReg() != NewReg) in isNewRegClobberedByRefs()
385 unsigned NewReg = Order[i]; in findSuitableFreeRegister() local
387 if (NewReg == AntiDepReg) continue; in findSuitableFreeRegister()
391 if (NewReg == LastNewReg) continue; in findSuitableFreeRegister()
395 if (isNewRegClobberedByRefs(RegRefBegin, RegRefEnd, NewReg)) continue; in findSuitableFreeRegister()
400 assert(((KillIndices[NewReg] == ~0u) != (DefIndices[NewReg] == ~0u)) in findSuitableFreeRegister()
402 if (KillIndices[NewReg] != ~0u || in findSuitableFreeRegister()
403 Classes[NewReg] == reinterpret_cast<TargetRegisterClass *>(-1) || in findSuitableFreeRegister()
[all …]
DMachineCSE.cpp540 unsigned NewReg = CSMI->getOperand(i).getReg(); in ProcessBlock() local
549 if (MO.isImplicit() && !MO.isDead() && OldReg == NewReg) in ProcessBlock()
552 if (OldReg == NewReg) { in ProcessBlock()
558 TargetRegisterInfo::isVirtualRegister(NewReg) && in ProcessBlock()
561 if (!isProfitableToCSE(NewReg, OldReg, CSMI, MI)) { in ProcessBlock()
570 if (!MRI->constrainRegClass(NewReg, OldRC)) { in ProcessBlock()
576 CSEPairs.push_back(std::make_pair(OldReg, NewReg)); in ProcessBlock()
584 unsigned NewReg = CSEPair.second; in ProcessBlock() local
586 MachineInstr *Def = MRI->getUniqueVRegDef(NewReg); in ProcessBlock()
588 Def->clearRegisterDeads(NewReg); in ProcessBlock()
[all …]
DAggressiveAntiDepBreaker.cpp644 unsigned NewReg = 0; in FindSuitableFreeRegisters() local
646 NewReg = NewSuperReg; in FindSuitableFreeRegisters()
650 NewReg = TRI->getSubReg(NewSuperReg, NewSubRegIdx); in FindSuitableFreeRegisters()
653 DEBUG(dbgs() << " " << TRI->getName(NewReg)); in FindSuitableFreeRegisters()
656 if (!RenameRegisterMap[Reg].test(NewReg)) { in FindSuitableFreeRegisters()
665 if (State->IsLive(NewReg) || (KillIndices[Reg] > DefIndices[NewReg])) { in FindSuitableFreeRegisters()
670 for (MCRegAliasIterator AI(NewReg, TRI, false); AI.isValid(); ++AI) { in FindSuitableFreeRegisters()
687 int Idx = UseMI->findRegisterDefOperandIdx(NewReg, false, true, TRI); in FindSuitableFreeRegisters()
705 if (DefMI->readsRegister(NewReg, TRI)) { in FindSuitableFreeRegisters()
712 RenameMap.insert(std::pair<unsigned, unsigned>(Reg, NewReg)); in FindSuitableFreeRegisters()
[all …]
DAntiDepBreaker.h58 void UpdateDbgValue(MachineInstr &MI, unsigned OldReg, unsigned NewReg) { in UpdateDbgValue() argument
61 MI.getOperand(0).setReg(NewReg); in UpdateDbgValue()
DTailDuplicator.cpp287 void TailDuplicator::addSSAUpdateEntry(unsigned OrigReg, unsigned NewReg, in addSSAUpdateEntry() argument
292 LI->second.push_back(std::make_pair(BB, NewReg)); in addSSAUpdateEntry()
295 Vals.push_back(std::make_pair(BB, NewReg)); in addSSAUpdateEntry()
351 unsigned NewReg = MRI->createVirtualRegister(RC); in duplicateInstruction() local
352 MO.setReg(NewReg); in duplicateInstruction()
353 LocalVRMap.insert(std::make_pair(Reg, RegSubRegPair(NewReg, 0))); in duplicateInstruction()
355 addSSAUpdateEntry(Reg, NewReg, PredBB); in duplicateInstruction()
395 unsigned NewReg = MRI->createVirtualRegister(NewRC); in duplicateInstruction() local
397 TII->get(TargetOpcode::COPY), NewReg) in duplicateInstruction()
400 LocalVRMap.insert(std::make_pair(Reg, RegSubRegPair(NewReg, 0))); in duplicateInstruction()
[all …]
DMachinePipeliner.cpp411 unsigned OldReg, unsigned NewReg,
2513 unsigned NewReg = VRMap[PrevStage][LoopVal]; in generateExistingPhis() local
2515 Def, NewReg); in generateExistingPhis()
2531 unsigned NewReg = 0; in generateExistingPhis() local
2630 NewReg = PhiOp2; in generateExistingPhis()
2637 NewReg = VRMap[ReuseStage][LoopVal]; in generateExistingPhis()
2640 &*BBI, Def, NewReg); in generateExistingPhis()
2642 VRMap[CurStageNum - np][Def] = NewReg; in generateExistingPhis()
2643 PhiOp2 = NewReg; in generateExistingPhis()
2648 replaceRegUsesAfterLoop(Def, NewReg, BB, MRI, LIS); in generateExistingPhis()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DCriticalAntiDepBreaker.cpp350 unsigned NewReg) { in isNewRegClobberedByRefs() argument
365 if (CheckOper.isRegMask() && CheckOper.clobbersPhysReg(NewReg)) in isNewRegClobberedByRefs()
369 CheckOper.getReg() != NewReg) in isNewRegClobberedByRefs()
400 unsigned NewReg = Order[i]; in findSuitableFreeRegister() local
402 if (NewReg == AntiDepReg) continue; in findSuitableFreeRegister()
406 if (NewReg == LastNewReg) continue; in findSuitableFreeRegister()
410 if (isNewRegClobberedByRefs(RegRefBegin, RegRefEnd, NewReg)) continue; in findSuitableFreeRegister()
415 assert(((KillIndices[NewReg] == ~0u) != (DefIndices[NewReg] == ~0u)) in findSuitableFreeRegister()
417 if (KillIndices[NewReg] != ~0u || in findSuitableFreeRegister()
418 Classes[NewReg] == reinterpret_cast<TargetRegisterClass *>(-1) || in findSuitableFreeRegister()
[all …]
DAntiDepBreaker.h60 void UpdateDbgValue(MachineInstr &MI, unsigned OldReg, unsigned NewReg) { in UpdateDbgValue() argument
63 MI.getOperand(0).setReg(NewReg); in UpdateDbgValue()
69 unsigned OldReg, unsigned NewReg) { in UpdateDbgValues() argument
77 UpdateDbgValue(*DbgMI, OldReg, NewReg); in UpdateDbgValues()
DAggressiveAntiDepBreaker.cpp663 unsigned NewReg = 0; in FindSuitableFreeRegisters() local
665 NewReg = NewSuperReg; in FindSuitableFreeRegisters()
669 NewReg = TRI->getSubReg(NewSuperReg, NewSubRegIdx); in FindSuitableFreeRegisters()
672 LLVM_DEBUG(dbgs() << " " << printReg(NewReg, TRI)); in FindSuitableFreeRegisters()
675 if (!RenameRegisterMap[Reg].test(NewReg)) { in FindSuitableFreeRegisters()
684 if (State->IsLive(NewReg) || (KillIndices[Reg] > DefIndices[NewReg])) { in FindSuitableFreeRegisters()
689 for (MCRegAliasIterator AI(NewReg, TRI, false); AI.isValid(); ++AI) { in FindSuitableFreeRegisters()
707 int Idx = UseMI->findRegisterDefOperandIdx(NewReg, false, true, TRI); in FindSuitableFreeRegisters()
725 if (DefMI->readsRegister(NewReg, TRI)) { in FindSuitableFreeRegisters()
732 RenameMap.insert(std::pair<unsigned, unsigned>(Reg, NewReg)); in FindSuitableFreeRegisters()
[all …]
DMachineCSE.cpp560 unsigned NewReg = CSMI->getOperand(i).getReg(); in ProcessBlock() local
569 if (MO.isImplicit() && !MO.isDead() && OldReg == NewReg) in ProcessBlock()
572 if (OldReg == NewReg) { in ProcessBlock()
578 TargetRegisterInfo::isVirtualRegister(NewReg) && in ProcessBlock()
581 if (!isProfitableToCSE(NewReg, OldReg, CSMI, MI)) { in ProcessBlock()
590 if (!MRI->constrainRegAttrs(NewReg, OldReg)) { in ProcessBlock()
597 CSEPairs.push_back(std::make_pair(OldReg, NewReg)); in ProcessBlock()
605 unsigned NewReg = CSEPair.second; in ProcessBlock() local
607 MachineInstr *Def = MRI->getUniqueVRegDef(NewReg); in ProcessBlock()
609 Def->clearRegisterDeads(NewReg); in ProcessBlock()
[all …]
DTailDuplicator.cpp323 void TailDuplicator::addSSAUpdateEntry(unsigned OrigReg, unsigned NewReg, in addSSAUpdateEntry() argument
328 LI->second.push_back(std::make_pair(BB, NewReg)); in addSSAUpdateEntry()
331 Vals.push_back(std::make_pair(BB, NewReg)); in addSSAUpdateEntry()
393 unsigned NewReg = MRI->createVirtualRegister(RC); in duplicateInstruction() local
394 MO.setReg(NewReg); in duplicateInstruction()
395 LocalVRMap.insert(std::make_pair(Reg, RegSubRegPair(NewReg, 0))); in duplicateInstruction()
397 addSSAUpdateEntry(Reg, NewReg, PredBB); in duplicateInstruction()
437 unsigned NewReg = MRI->createVirtualRegister(NewRC); in duplicateInstruction() local
439 TII->get(TargetOpcode::COPY), NewReg) in duplicateInstruction()
442 LocalVRMap.insert(std::make_pair(Reg, RegSubRegPair(NewReg, 0))); in duplicateInstruction()
[all …]
DMachinePipeliner.cpp449 unsigned OldReg, unsigned NewReg,
835 unsigned NewReg = MRI.createVirtualRegister(RC); in preprocessPhiNodes() local
839 auto Copy = BuildMI(PredB, At, DL, TII->get(TargetOpcode::COPY), NewReg) in preprocessPhiNodes()
843 RegOp.setReg(NewReg); in preprocessPhiNodes()
2635 unsigned NewReg = VRMap[PrevStage][LoopVal]; in generateExistingPhis() local
2637 Def, InitVal, NewReg); in generateExistingPhis()
2650 unsigned NewReg = 0; in generateExistingPhis() local
2748 NewReg = PhiOp2; in generateExistingPhis()
2755 NewReg = VRMap[ReuseStage - np][LoopVal]; in generateExistingPhis()
2758 &*BBI, Def, NewReg); in generateExistingPhis()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/WebAssembly/
DWebAssemblyPeephole.cpp61 static bool MaybeRewriteToDrop(unsigned OldReg, unsigned NewReg, in MaybeRewriteToDrop() argument
65 if (OldReg == NewReg) { in MaybeRewriteToDrop()
67 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(OldReg)); in MaybeRewriteToDrop() local
68 MO.setReg(NewReg); in MaybeRewriteToDrop()
70 MFI.stackifyVReg(NewReg); in MaybeRewriteToDrop()
100 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in MaybeRewriteToFallthrough() local
101 BuildMI(MBB, MI, MI.getDebugLoc(), TII.get(CopyLocalOpc), NewReg) in MaybeRewriteToFallthrough()
103 MO.setReg(NewReg); in MaybeRewriteToFallthrough()
104 MFI.stackifyVReg(NewReg); in MaybeRewriteToFallthrough()
148 unsigned NewReg = Op2.getReg(); in runOnMachineFunction() local
[all …]
DWebAssemblyExplicitLocals.cpp244 unsigned NewReg = MRI.createVirtualRegister(RC); in runOnMachineFunction() local
246 BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Opc), NewReg) in runOnMachineFunction()
248 MI.getOperand(2).setReg(NewReg); in runOnMachineFunction()
249 MFI.stackifyVReg(NewReg); in runOnMachineFunction()
273 unsigned NewReg = MRI.createVirtualRegister(RC); in runOnMachineFunction() local
284 .addReg(NewReg); in runOnMachineFunction()
292 .addReg(NewReg); in runOnMachineFunction()
294 MI.getOperand(0).setReg(NewReg); in runOnMachineFunction()
298 MFI.stackifyVReg(NewReg); in runOnMachineFunction()
341 unsigned NewReg = MRI.createVirtualRegister(RC); in runOnMachineFunction() local
[all …]
DWebAssemblyRegStackify.cpp487 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in MoveForSingleUse() local
488 Def->getOperand(0).setReg(NewReg); in MoveForSingleUse()
489 Op.setReg(NewReg); in MoveForSingleUse()
492 LIS.createAndComputeVirtRegInterval(NewReg); in MoveForSingleUse()
500 MFI.stackifyVReg(NewReg); in MoveForSingleUse()
519 unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(Reg)); in RematerializeCheapDef() local
520 TII->reMaterialize(MBB, Insert, NewReg, 0, Def, *TRI); in RematerializeCheapDef()
521 Op.setReg(NewReg); in RematerializeCheapDef()
524 LIS.createAndComputeVirtRegInterval(NewReg); in RematerializeCheapDef()
525 MFI.stackifyVReg(NewReg); in RematerializeCheapDef()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/GlobalISel/
DCallLowering.cpp172 unsigned NewReg = MRI.createGenericVirtualRegister(LocTy); in extendRegister() local
173 MIRBuilder.buildSExt(NewReg, ValReg); in extendRegister()
174 return NewReg; in extendRegister()
177 unsigned NewReg = MRI.createGenericVirtualRegister(LocTy); in extendRegister() local
178 MIRBuilder.buildZExt(NewReg, ValReg); in extendRegister()
179 return NewReg; in extendRegister()
DLocalizer.cpp113 unsigned NewReg = in runOnMachineFunction() local
115 MRI->setRegClassOrRegBank(NewReg, MRI->getRegClassOrRegBank(Reg)); in runOnMachineFunction()
116 LocalizedMI->getOperand(0).setReg(NewReg); in runOnMachineFunction()
118 MBBWithLocalDef.insert(std::make_pair(MBBAndReg, NewReg)).first; in runOnMachineFunction()
DUtils.cpp37 unsigned NewReg = MRI.createVirtualRegister(&RegClass); in constrainRegToClass() local
39 TII.get(TargetOpcode::COPY), NewReg) in constrainRegToClass()
41 return NewReg; in constrainRegToClass()
/external/llvm/lib/Target/AArch64/
DAArch64DeadRegisterDefinitionsPass.cpp121 unsigned NewReg; in processMachineBasicBlock() local
127 NewReg = AArch64::WZR; in processMachineBasicBlock()
130 NewReg = AArch64::XZR; in processMachineBasicBlock()
134 MO.setReg(NewReg); in processMachineBasicBlock()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AArch64/
DAArch64DeadRegisterDefinitionsPass.cpp177 unsigned NewReg; in processMachineBasicBlock() local
182 NewReg = AArch64::WZR; in processMachineBasicBlock()
184 NewReg = AArch64::XZR; in processMachineBasicBlock()
190 MO.setReg(NewReg); in processMachineBasicBlock()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/X86/
DX86FlagsCopyLowering.cpp933 unsigned NewReg; in rewriteSetCarryExtended() local
947 NewReg = MRI->createVirtualRegister(&X86::GR32RegClass); in rewriteSetCarryExtended()
948 BuildMI(MBB, SetPos, SetLoc, TII->get(X86::MOVZX32rr8), NewReg) in rewriteSetCarryExtended()
951 return NewReg; in rewriteSetCarryExtended()
952 Reg = NewReg; in rewriteSetCarryExtended()
956 NewReg = MRI->createVirtualRegister(&SetBRC); in rewriteSetCarryExtended()
959 NewReg) in rewriteSetCarryExtended()
970 NewReg) in rewriteSetCarryExtended()
973 BuildMI(MBB, SetPos, SetLoc, TII->get(TargetOpcode::COPY), NewReg) in rewriteSetCarryExtended()
976 return NewReg; in rewriteSetCarryExtended()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/ARM/
DA15SDOptimizer.cpp632 unsigned NewReg = optimizeSDPattern(MI); in runOnInstruction() local
634 if (NewReg != 0) { in runOnInstruction()
643 MRI->constrainRegClass(NewReg, MRI->getRegClass((*I)->getReg())); in runOnInstruction()
646 << printReg(NewReg) << "\n"); in runOnInstruction()
647 (*I)->substVirtReg(NewReg, 0, *TRI); in runOnInstruction()
650 Replacements[MI] = NewReg; in runOnInstruction()
/external/llvm/lib/Target/ARM/
DA15SDOptimizer.cpp647 unsigned NewReg = optimizeSDPattern(MI); in runOnInstruction() local
649 if (NewReg != 0) { in runOnInstruction()
658 MRI->constrainRegClass(NewReg, MRI->getRegClass((*I)->getReg())); in runOnInstruction()
662 << PrintReg(NewReg) << "\n"); in runOnInstruction()
663 (*I)->substVirtReg(NewReg, 0, *TRI); in runOnInstruction()
666 Replacements[MI] = NewReg; in runOnInstruction()

123