Lines Matching refs:InsnClass
99 // canAddInsnClass - Returns true if an instruction of type InsnClass is a
100 // valid transition from this state, i.e., can an instruction of type InsnClass
106 bool canAddInsnClass(unsigned InsnClass) const;
111 void AddInsnClass(unsigned InsnClass, std::set<unsigned> &PossibleStates);
113 // addTransition - Add a transition from this state given the input InsnClass
115 void addTransition(unsigned InsnClass, State *To);
118 // given the input InsnClass
120 bool hasTransition(unsigned InsnClass);
171 // addTransition - Add a transition from this state given the input InsnClass
173 void State::addTransition(unsigned InsnClass, State *To) {
174 assert(!Transitions.count(InsnClass) &&
176 Transitions[InsnClass] = To;
181 // given the input InsnClass
183 bool State::hasTransition(unsigned InsnClass) {
184 return Transitions.count(InsnClass) > 0;
191 void State::AddInsnClass(unsigned InsnClass,
202 // Iterate over all possible resources used in InsnClass.
203 // For ex: for InsnClass = 0x11, all resources = {0x01, 0x10}.
207 for (unsigned int j = 0; j < sizeof(InsnClass) * 8; ++j) {
208 if ((0x1 << j) & InsnClass) {
210 // For each possible resource used in InsnClass, generate the
220 // InsnClass in the current packet.
237 // canAddInsnClass - Quickly verifies if an instruction of type InsnClass is a
238 // valid transition from this state i.e., can an instruction of type InsnClass
241 bool State::canAddInsnClass(unsigned InsnClass) const {
244 if (~*SI & InsnClass)
480 unsigned InsnClass = *CI;
485 // and the state can accommodate this InsnClass, create a transition.
487 if (!current->hasTransition(InsnClass) &&
488 current->canAddInsnClass(InsnClass)) {
490 current->AddInsnClass(InsnClass, NewStateResources);
508 current->addTransition(InsnClass, NewState);