/external/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyPeephole.cpp | 58 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 …]
|
D | WebAssemblyRegStackify.cpp | 452 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/ |
D | CriticalAntiDepBreaker.cpp | 333 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 …]
|
D | AggressiveAntiDepBreaker.cpp | 644 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 …]
|
D | MachineCSE.cpp | 540 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 …]
|
D | TailDuplicator.cpp | 287 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 …]
|
D | AntiDepBreaker.h | 58 void UpdateDbgValue(MachineInstr &MI, unsigned OldReg, unsigned NewReg) { in UpdateDbgValue() argument 61 MI.getOperand(0).setReg(NewReg); in UpdateDbgValue()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | CriticalAntiDepBreaker.cpp | 350 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 …]
|
D | AntiDepBreaker.h | 60 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()
|
D | AggressiveAntiDepBreaker.cpp | 663 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 …]
|
D | MachineCSE.cpp | 560 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 …]
|
D | TailDuplicator.cpp | 323 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 …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyPeephole.cpp | 61 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 …]
|
D | WebAssemblyExplicitLocals.cpp | 244 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 …]
|
D | WebAssemblyRegStackify.cpp | 487 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/lib/CodeGen/ |
D | CriticalAntiDepBreaker.cpp | 342 unsigned NewReg) in isNewRegClobberedByRefs() argument 359 CheckOper.getReg() != NewReg) in isNewRegClobberedByRefs() 390 unsigned NewReg = Order[i]; in findSuitableFreeRegister() local 392 if (NewReg == AntiDepReg) continue; in findSuitableFreeRegister() 396 if (NewReg == LastNewReg) continue; in findSuitableFreeRegister() 400 if (isNewRegClobberedByRefs(RegRefBegin, RegRefEnd, NewReg)) continue; in findSuitableFreeRegister() 405 assert(((KillIndices[NewReg] == ~0u) != (DefIndices[NewReg] == ~0u)) in findSuitableFreeRegister() 407 if (KillIndices[NewReg] != ~0u || in findSuitableFreeRegister() 408 Classes[NewReg] == reinterpret_cast<TargetRegisterClass *>(-1) || in findSuitableFreeRegister() 409 KillIndices[AntiDepReg] > DefIndices[NewReg]) in findSuitableFreeRegister() [all …]
|
D | StrongPHIElimination.cpp | 142 void MergeLIsAndRename(unsigned Reg, unsigned NewReg); 311 unsigned NewReg = RegRenamingMap[SrcColor]; in runOnMachineFunction() local 312 if (!NewReg) { in runOnMachineFunction() 313 NewReg = SrcReg; in runOnMachineFunction() 316 MergeLIsAndRename(SrcReg, NewReg); in runOnMachineFunction() 320 MergeLIsAndRename(DestReg, NewReg); in runOnMachineFunction() 324 MergeLIsAndRename(SrcReg, NewReg); in runOnMachineFunction() 343 unsigned NewReg = RegRenamingMap[DestColor]; in runOnMachineFunction() local 346 LiveInterval &NewLI = LI->getInterval(NewReg); in runOnMachineFunction() 363 MRI->replaceRegWith(DestReg, NewReg); in runOnMachineFunction() [all …]
|
D | AggressiveAntiDepBreaker.cpp | 654 unsigned NewReg = 0; in FindSuitableFreeRegisters() local 656 NewReg = NewSuperReg; in FindSuitableFreeRegisters() 660 NewReg = TRI->getSubReg(NewSuperReg, NewSubRegIdx); in FindSuitableFreeRegisters() 663 DEBUG(dbgs() << " " << TRI->getName(NewReg)); in FindSuitableFreeRegisters() 667 if (!BV.test(NewReg)) { in FindSuitableFreeRegisters() 676 if (State->IsLive(NewReg) || (KillIndices[Reg] > DefIndices[NewReg])) { in FindSuitableFreeRegisters() 681 for (const unsigned *Alias = TRI->getAliasSet(NewReg); in FindSuitableFreeRegisters() 696 RenameMap.insert(std::pair<unsigned, unsigned>(Reg, NewReg)); in FindSuitableFreeRegisters() 907 unsigned NewReg = S->second; in BreakAntiDependencies() local 910 TRI->getName(NewReg) << "(" << in BreakAntiDependencies() [all …]
|
D | StackSlotColoring.cpp | 137 unsigned OldReg, unsigned NewReg); 140 unsigned OldReg, unsigned NewReg); 497 unsigned OldReg, unsigned NewReg) { in PropagateBackward() argument 525 if (RC && !RC->contains(NewReg)) in PropagateBackward() 535 } else if (TRI->regsOverlap(Reg, NewReg)) { in PropagateBackward() 546 Refs[i]->setReg(NewReg); in PropagateBackward() 562 unsigned OldReg, unsigned NewReg) { in PropagateForward() argument 587 if (RC && !RC->contains(NewReg)) in PropagateForward() 593 } else if (TRI->regsOverlap(Reg, NewReg) || in PropagateForward() 599 Uses[i]->setReg(NewReg); in PropagateForward()
|
D | AntiDepBreaker.h | 62 void UpdateDbgValue(MachineInstr *MI, unsigned OldReg, unsigned NewReg) { in UpdateDbgValue() argument 65 MI->getOperand(0).setReg(NewReg); in UpdateDbgValue()
|
/external/swiftshader/third_party/LLVM/lib/Target/Mips/ |
D | MipsFrameLowering.cpp | 110 unsigned& NewReg, int& NewImm, in expandRegLargeImmPair() argument 115 NewReg = OrigReg; in expandRegLargeImmPair() 132 NewReg = Mips::AT; in expandRegLargeImmPair() 149 unsigned NewReg = 0; in emitPrologue() local 181 ATUsed = expandRegLargeImmPair(Mips::SP, -StackSize, NewReg, NewImm, MBB, in emitPrologue() 184 .addReg(NewReg).addImm(NewImm); in emitPrologue() 279 unsigned NewReg = 0; in emitEpilogue() local 298 ATUsed = expandRegLargeImmPair(Mips::SP, StackSize, NewReg, NewImm, MBB, in emitEpilogue() 301 .addReg(NewReg).addImm(NewImm); in emitEpilogue()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/GlobalISel/ |
D | CallLowering.cpp | 172 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()
|
D | Localizer.cpp | 113 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()
|
/external/llvm/lib/Target/AArch64/ |
D | AArch64DeadRegisterDefinitionsPass.cpp | 121 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/ |
D | AArch64DeadRegisterDefinitionsPass.cpp | 177 unsigned NewReg; in processMachineBasicBlock() local 182 NewReg = AArch64::WZR; in processMachineBasicBlock() 184 NewReg = AArch64::XZR; in processMachineBasicBlock() 190 MO.setReg(NewReg); in processMachineBasicBlock()
|