Lines Matching refs:Rule
97 static bool hasNoSimpleLoops(const LegalizeRule &Rule, const LegalityQuery &Q, in hasNoSimpleLoops() argument
99 switch (Rule.getAction()) { in hasNoSimpleLoops()
113 static bool mutationIsSane(const LegalizeRule &Rule, in mutationIsSane() argument
118 if (Rule.getAction() == Custom || Rule.getAction() == Legal) in mutationIsSane()
125 switch (Rule.getAction()) { in mutationIsSane()
135 if (Rule.getAction() == FewerElements) { in mutationIsSane()
144 } else if (Rule.getAction() == MoreElements) in mutationIsSane()
162 if (Rule.getAction() == NarrowScalar) { in mutationIsSane()
190 for (const LegalizeRule &Rule : Rules) { in apply() local
191 if (Rule.match(Query)) { in apply()
193 std::pair<unsigned, LLT> Mutation = Rule.determineMutation(Query); in apply()
194 LLVM_DEBUG(dbgs() << ".. .. " << Rule.getAction() << ", " in apply()
196 assert(mutationIsSane(Rule, Query, Mutation) && in apply()
198 assert(hasNoSimpleLoops(Rule, Query, Mutation) && "Simple loop detected"); in apply()
199 return {Rule.getAction(), Mutation.first, Mutation.second}; in apply()