Lines Matching refs:Rule
95 static bool hasNoSimpleLoops(const LegalizeRule &Rule, const LegalityQuery &Q, in hasNoSimpleLoops() argument
97 switch (Rule.getAction()) { in hasNoSimpleLoops()
112 static bool mutationIsSane(const LegalizeRule &Rule, in mutationIsSane() argument
117 if (Rule.getAction() == Custom || Rule.getAction() == Legal) in mutationIsSane()
128 switch (Rule.getAction()) { in mutationIsSane()
138 if (Rule.getAction() == FewerElements) { in mutationIsSane()
147 } else if (Rule.getAction() == MoreElements) in mutationIsSane()
165 if (Rule.getAction() == NarrowScalar) { in mutationIsSane()
193 for (const LegalizeRule &Rule : Rules) { in apply() local
194 if (Rule.match(Query)) { in apply()
196 std::pair<unsigned, LLT> Mutation = Rule.determineMutation(Query); in apply()
197 LLVM_DEBUG(dbgs() << ".. .. " << Rule.getAction() << ", " in apply()
199 assert(mutationIsSane(Rule, Query, Mutation) && in apply()
201 assert(hasNoSimpleLoops(Rule, Query, Mutation) && "Simple loop detected"); in apply()
202 return {Rule.getAction(), Mutation.first, Mutation.second}; in apply()