Home | History | Annotate | Download | only in SelectionDAG

Lines Matching full:funcinfo

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