- DEBUG(dbgs() << " FU:" << i
- << " (" << FUs.size() << " FUs) "
- << ProcName);
-
-
- // Convert macros to bits for each stage.
- unsigned numFUs = FUs.size();
- for (unsigned j = 0; j < numFUs; ++j) {
- assert ((j < DFA_MAX_RESOURCES) &&
- "Exceeded maximum number of representable resources");
- unsigned FuncResources = (unsigned) (1U << j);
- FUNameToBitsMap[FUs[j]->getName()] = FuncResources;
- DEBUG(dbgs() << " " << FUs[j]->getName()
- << ":0x" << utohexstr(FuncResources));
- }
- if (((int) numFUs) > maxFUs) {
- maxFUs = numFUs;
- }
- totalFUs += numFUs;
- DEBUG(dbgs() << "\n");
- }
- return totalFUs;
-}
-
-//
-// collectAllComboFuncs - Construct a map from a combo function unit bit to
-// the bits of all included functional units.
-//
-int DFAPacketizerEmitter::collectAllComboFuncs(
- std::vector<Record*> &ComboFuncList,
- std::map<std::string, unsigned> &FUNameToBitsMap,
- std::map<unsigned, unsigned> &ComboBitToBitsMap,
- raw_ostream &OS) {
- DEBUG(dbgs() << "-----------------------------------------------------------------------------\n");
- DEBUG(dbgs() << "collectAllComboFuncs");
- DEBUG(dbgs() << " (" << ComboFuncList.size() << " sets)\n");
-
- int numCombos = 0;
- for (unsigned i = 0, N = ComboFuncList.size(); i < N; ++i) {
- Record *Func = ComboFuncList[i];
- const std::string &ProcName = Func->getName();
- std::vector<Record*> FUs = Func->getValueAsListOfDefs("CFD");
-
- DEBUG(dbgs() << " CFD:" << i
- << " (" << FUs.size() << " combo FUs) "
- << ProcName << "\n");
-