Lines Matching refs:FuncInfo
357 FuncInfo(new FunctionLoweringInfo()), in SelectionDAGISel()
359 SDB(new SelectionDAGBuilder(*CurDAG, *FuncInfo, OL)), in SelectionDAGISel()
374 delete FuncInfo; in ~SelectionDAGISel()
462 FuncInfo->set(Fn, *MF, CurDAG); in runOnMachineFunction()
465 FuncInfo->BPI = &getAnalysis<BranchProbabilityInfoWrapperPass>().getBPI(); in runOnMachineFunction()
467 FuncInfo->BPI = nullptr; in runOnMachineFunction()
473 FuncInfo->SplitCSR = false; in runOnMachineFunction()
478 FuncInfo->SplitCSR = true; in runOnMachineFunction()
490 FuncInfo->SplitCSR = false; in runOnMachineFunction()
496 if (FuncInfo->SplitCSR) in runOnMachineFunction()
509 if (FuncInfo->SplitCSR) { in runOnMachineFunction()
526 if (!FuncInfo->ArgDbgValues.empty()) in runOnMachineFunction()
533 for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) { in runOnMachineFunction()
534 MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1]; in runOnMachineFunction()
621 I = FuncInfo->RegFixups.begin(), E = FuncInfo->RegFixups.end(); in runOnMachineFunction()
628 DenseMap<unsigned, unsigned>::iterator J = FuncInfo->RegFixups.find(To); in runOnMachineFunction()
657 FuncInfo->clear(); in runOnMachineFunction()
719 FuncInfo->AddLiveOutRegInfo(DestReg, NumSignBits, KnownZero, KnownOne); in ComputeLiveOutVRegInfo()
734 FuncInfo->MBB->getBasicBlock()->getName().str()); in CodeGenAndEmitDAG()
742 BlockNumber = FuncInfo->MBB->getNumber(); in CodeGenAndEmitDAG()
744 (MF->getName() + ":" + FuncInfo->MBB->getBasicBlock()->getName()).str(); in CodeGenAndEmitDAG()
865 Scheduler->Run(CurDAG, FuncInfo->MBB); in CodeGenAndEmitDAG()
873 MachineBasicBlock *FirstMBB = FuncInfo->MBB, *LastMBB; in CodeGenAndEmitDAG()
879 LastMBB = FuncInfo->MBB = Scheduler->EmitSchedule(FuncInfo->InsertPt); in CodeGenAndEmitDAG()
919 << FuncInfo->MBB->getNumber() in DoInstructionSelection()
920 << " '" << FuncInfo->MBB->getName() << "'\n"); in DoInstructionSelection()
978 MachineBasicBlock *MBB = FuncInfo->MBB; in PrepareEHLandingPad()
979 const Constant *PersonalityFn = FuncInfo->Fn->getPersonalityFn(); in PrepareEHLandingPad()
993 unsigned VReg = FuncInfo->getCatchPadExceptionPointerVReg(CPI, PtrRC); in PrepareEHLandingPad()
994 BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), in PrepareEHLandingPad()
1012 BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II) in PrepareEHLandingPad()
1017 FuncInfo->ExceptionPointerVirtReg = MBB->addLiveIn(Reg, PtrRC); in PrepareEHLandingPad()
1021 FuncInfo->ExceptionSelectorVirtReg = MBB->addLiveIn(Reg, PtrRC); in PrepareEHLandingPad()
1030 FunctionLoweringInfo *FuncInfo) { in isFoldedOrDeadInstruction() argument
1035 !FuncInfo->isExportedInst(I); // Exported instrs must be computed. in isFoldedOrDeadInstruction()
1151 FunctionLoweringInfo *FuncInfo) { in setupSwiftErrorVals() argument
1155 FuncInfo->SwiftErrorVals.clear(); in setupSwiftErrorVals()
1156 FuncInfo->SwiftErrorMap.clear(); in setupSwiftErrorVals()
1157 FuncInfo->SwiftErrorWorklist.clear(); in setupSwiftErrorVals()
1163 FuncInfo->SwiftErrorVals.push_back(&*AI); in setupSwiftErrorVals()
1169 FuncInfo->SwiftErrorVals.push_back(Alloca); in setupSwiftErrorVals()
1177 static void mergeIncomingSwiftErrors(FunctionLoweringInfo *FuncInfo, in mergeIncomingSwiftErrors() argument
1187 if (FuncInfo->SwiftErrorVals.empty()) in mergeIncomingSwiftErrors()
1200 for (unsigned I = 0, E = FuncInfo->SwiftErrorVals.size(); I < E; I++) { in mergeIncomingSwiftErrors()
1201 unsigned VReg = FuncInfo->MF->getRegInfo().createVirtualRegister(RC); in mergeIncomingSwiftErrors()
1204 BuildMI(*FuncInfo->MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), in mergeIncomingSwiftErrors()
1206 FuncInfo->SwiftErrorMap[FuncInfo->MBB].push_back(VReg); in mergeIncomingSwiftErrors()
1212 auto *UniquePredMBB = FuncInfo->MBBMap[UniquePred]; in mergeIncomingSwiftErrors()
1213 if (!FuncInfo->SwiftErrorMap.count(UniquePredMBB)) { in mergeIncomingSwiftErrors()
1215 for (unsigned I = 0, E = FuncInfo->SwiftErrorVals.size(); I < E; I++) { in mergeIncomingSwiftErrors()
1216 unsigned VReg = FuncInfo->MF->getRegInfo().createVirtualRegister(RC); in mergeIncomingSwiftErrors()
1217 FuncInfo->SwiftErrorWorklist[UniquePredMBB].push_back(VReg); in mergeIncomingSwiftErrors()
1219 FuncInfo->SwiftErrorMap[FuncInfo->MBB].push_back(VReg); in mergeIncomingSwiftErrors()
1224 FuncInfo->SwiftErrorMap[FuncInfo->MBB] = in mergeIncomingSwiftErrors()
1225 FuncInfo->SwiftErrorMap[UniquePredMBB]; in mergeIncomingSwiftErrors()
1233 auto *PredMBB = FuncInfo->MBBMap[*PI]; in mergeIncomingSwiftErrors()
1234 if (!FuncInfo->SwiftErrorMap.count(PredMBB) && in mergeIncomingSwiftErrors()
1235 !FuncInfo->SwiftErrorWorklist.count(PredMBB)) { in mergeIncomingSwiftErrors()
1236 for (unsigned I = 0, E = FuncInfo->SwiftErrorVals.size(); I < E; I++) { in mergeIncomingSwiftErrors()
1237 unsigned VReg = FuncInfo->MF->getRegInfo().createVirtualRegister(RC); in mergeIncomingSwiftErrors()
1240 FuncInfo->SwiftErrorWorklist[PredMBB].push_back(VReg); in mergeIncomingSwiftErrors()
1247 for (unsigned I = 0, E = FuncInfo->SwiftErrorVals.size(); I < E; I++) { in mergeIncomingSwiftErrors()
1248 unsigned VReg = FuncInfo->MF->getRegInfo().createVirtualRegister(RC); in mergeIncomingSwiftErrors()
1249 FuncInfo->SwiftErrorMap[FuncInfo->MBB].push_back(VReg); in mergeIncomingSwiftErrors()
1251 MachineInstrBuilder SwiftErrorPHI = BuildMI(*FuncInfo->MBB, in mergeIncomingSwiftErrors()
1252 FuncInfo->MBB->begin(), SDB->getCurDebugLoc(), in mergeIncomingSwiftErrors()
1256 auto *PredMBB = FuncInfo->MBBMap[*PI]; in mergeIncomingSwiftErrors()
1257 unsigned SwiftErrorReg = FuncInfo->SwiftErrorMap.count(PredMBB) ? in mergeIncomingSwiftErrors()
1258 FuncInfo->SwiftErrorMap[PredMBB][I] : in mergeIncomingSwiftErrors()
1259 FuncInfo->SwiftErrorWorklist[PredMBB][I]; in mergeIncomingSwiftErrors()
1270 FastIS = TLI->createFastISel(*FuncInfo, LibInfo); in SelectAllBasicBlocks()
1272 setupSwiftErrorVals(Fn, TLI, FuncInfo); in SelectAllBasicBlocks()
1284 if (!FuncInfo->VisitedBBs.count(*PI)) { in SelectAllBasicBlocks()
1293 FuncInfo->ComputePHILiveOutRegInfo(PN); in SelectAllBasicBlocks()
1297 FuncInfo->InvalidatePHILiveOutRegInfo(PN); in SelectAllBasicBlocks()
1300 FuncInfo->VisitedBBs.insert(LLVMBB); in SelectAllBasicBlocks()
1308 FuncInfo->MBB = FuncInfo->MBBMap[LLVMBB]; in SelectAllBasicBlocks()
1309 if (!FuncInfo->MBB) in SelectAllBasicBlocks()
1311 FuncInfo->InsertPt = FuncInfo->MBB->getFirstNonPHI(); in SelectAllBasicBlocks()
1312 mergeIncomingSwiftErrors(FuncInfo, TLI, TII, LLVMBB, SDB); in SelectAllBasicBlocks()
1315 FuncInfo->ExceptionPointerVirtReg = 0; in SelectAllBasicBlocks()
1316 FuncInfo->ExceptionSelectorVirtReg = 0; in SelectAllBasicBlocks()
1347 if (FuncInfo->InsertPt != FuncInfo->MBB->begin()) in SelectAllBasicBlocks()
1348 FastIS->setLastLocalValue(&*std::prev(FuncInfo->InsertPt)); in SelectAllBasicBlocks()
1359 if (isFoldedOrDeadInstruction(Inst, FuncInfo)) { in SelectAllBasicBlocks()
1378 if (!isFoldedOrDeadInstruction(BeforeInst, FuncInfo)) in SelectAllBasicBlocks()
1411 unsigned &R = FuncInfo->ValueMap[Inst]; in SelectAllBasicBlocks()
1413 R = FuncInfo->CreateRegs(Inst->getType()); in SelectAllBasicBlocks()
1417 MachineBasicBlock::iterator SavedInsertPt = FuncInfo->InsertPt; in SelectAllBasicBlocks()
1423 FastIS->removeDeadCode(SavedInsertPt, FuncInfo->MBB->end()); in SelectAllBasicBlocks()
1468 SDB->SPDescriptor.initialize(LLVMBB, FuncInfo->MBBMap[LLVMBB], in SelectAllBasicBlocks()
1486 FuncInfo->PHINodesToUpdate.clear(); in SelectAllBasicBlocks()
1581 << FuncInfo->PHINodesToUpdate.size() << "\n"; in FinishBasicBlock()
1582 for (unsigned i = 0, e = FuncInfo->PHINodesToUpdate.size(); i != e; ++i) in FinishBasicBlock()
1584 << FuncInfo->PHINodesToUpdate[i].first in FinishBasicBlock()
1585 << ", " << FuncInfo->PHINodesToUpdate[i].second << ")\n"); in FinishBasicBlock()
1589 for (unsigned i = 0, e = FuncInfo->PHINodesToUpdate.size(); i != e; ++i) { in FinishBasicBlock()
1590 MachineInstrBuilder PHI(*MF, FuncInfo->PHINodesToUpdate[i].first); in FinishBasicBlock()
1593 if (!FuncInfo->MBB->isSuccessor(PHI->getParent())) in FinishBasicBlock()
1595 PHI.addReg(FuncInfo->PHINodesToUpdate[i].second).addMBB(FuncInfo->MBB); in FinishBasicBlock()
1605 FuncInfo->MBB = ParentMBB; in FinishBasicBlock()
1606 FuncInfo->InsertPt = in FinishBasicBlock()
1634 FuncInfo->MBB = ParentMBB; in FinishBasicBlock()
1635 FuncInfo->InsertPt = ParentMBB->end(); in FinishBasicBlock()
1644 FuncInfo->MBB = FailureMBB; in FinishBasicBlock()
1645 FuncInfo->InsertPt = FailureMBB->end(); in FinishBasicBlock()
1661 FuncInfo->MBB = BTB.Parent; in FinishBasicBlock()
1662 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1664 SDB->visitBitTestHeader(BTB, FuncInfo->MBB); in FinishBasicBlock()
1674 FuncInfo->MBB = BTB.Cases[j].ThisBB; in FinishBasicBlock()
1675 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1700 FuncInfo->MBB); in FinishBasicBlock()
1714 for (unsigned pi = 0, pe = FuncInfo->PHINodesToUpdate.size(); in FinishBasicBlock()
1716 MachineInstrBuilder PHI(*MF, FuncInfo->PHINodesToUpdate[pi].first); in FinishBasicBlock()
1723 PHI.addReg(FuncInfo->PHINodesToUpdate[pi].second).addMBB(BTB.Parent); in FinishBasicBlock()
1725 PHI.addReg(FuncInfo->PHINodesToUpdate[pi].second) in FinishBasicBlock()
1734 PHI.addReg(FuncInfo->PHINodesToUpdate[pi].second).addMBB(cBB); in FinishBasicBlock()
1747 FuncInfo->MBB = SDB->JTCases[i].first.HeaderBB; in FinishBasicBlock()
1748 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1751 FuncInfo->MBB); in FinishBasicBlock()
1758 FuncInfo->MBB = SDB->JTCases[i].second.MBB; in FinishBasicBlock()
1759 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1767 for (unsigned pi = 0, pe = FuncInfo->PHINodesToUpdate.size(); in FinishBasicBlock()
1769 MachineInstrBuilder PHI(*MF, FuncInfo->PHINodesToUpdate[pi].first); in FinishBasicBlock()
1775 PHI.addReg(FuncInfo->PHINodesToUpdate[pi].second) in FinishBasicBlock()
1778 if (FuncInfo->MBB->isSuccessor(PHIBB)) in FinishBasicBlock()
1779 PHI.addReg(FuncInfo->PHINodesToUpdate[pi].second).addMBB(FuncInfo->MBB); in FinishBasicBlock()
1788 FuncInfo->MBB = SDB->SwitchCases[i].ThisBB; in FinishBasicBlock()
1789 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1798 SDB->visitSwitchCase(SDB->SwitchCases[i], FuncInfo->MBB); in FinishBasicBlock()
1805 MachineBasicBlock *ThisBB = FuncInfo->MBB; in FinishBasicBlock()
1812 FuncInfo->MBB = Succs[i]; in FinishBasicBlock()
1813 FuncInfo->InsertPt = FuncInfo->MBB->end(); in FinishBasicBlock()
1816 if (ThisBB->isSuccessor(FuncInfo->MBB)) { in FinishBasicBlock()
1818 MBBI = FuncInfo->MBB->begin(), MBBE = FuncInfo->MBB->end(); in FinishBasicBlock()
1823 assert(pn != FuncInfo->PHINodesToUpdate.size() && in FinishBasicBlock()
1825 if (FuncInfo->PHINodesToUpdate[pn].first == PHI) { in FinishBasicBlock()
1826 PHI.addReg(FuncInfo->PHINodesToUpdate[pn].second).addMBB(ThisBB); in FinishBasicBlock()