Below is canReserveResources and ReserveResources 's code, I do not get what kind of resource it tries to reserve, and where should I define the resource.
bool DFAPacketizer::canReserveResources(const MCInstrDesc *MID) {
unsigned Action = ItinActions[MID->getSchedClass()];
if (MID->getSchedClass() == 0 || Action == 0)
return false;
return A.canAdd(Action);
}
// Reserve the resources occupied by a MCInstrDesc and change the current
// state to reflect that change.
void DFAPacketizer::reserveResources(const MCInstrDesc *MID) {
unsigned Action = ItinActions[MID->getSchedClass()];
if (MID->getSchedClass() == 0 || Action == 0)
return;
A.add(Action);
}