Lines Matching refs:Matcher
25 static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, in ContractNodes()
28 Matcher *N = MatcherPtr.get(); in ContractNodes()
34 OwningPtr<Matcher> Child(Scope->takeChild(i)); in ContractNodes()
44 Matcher *New = 0; in ContractNodes()
80 Matcher *EmitNode = MatcherPtr.take(); in ContractNodes()
81 Matcher *MFR = EmitNode->takeNext(); in ContractNodes()
82 Matcher *Tail = MFR->takeNext(); in ContractNodes()
160 Matcher *CheckType = MatcherPtr.take(); in ContractNodes()
161 Matcher *CheckOpcode = CheckType->takeNext(); in ContractNodes()
162 Matcher *Tail = CheckOpcode->takeNext(); in ContractNodes()
183 static void SinkPatternPredicates(OwningPtr<Matcher> &MatcherPtr) { in SinkPatternPredicates()
186 Matcher *N = MatcherPtr.get(); in SinkPatternPredicates()
192 OwningPtr<Matcher> Child(Scope->takeChild(i)); in SinkPatternPredicates()
228 static Matcher *FindNodeWithKind(Matcher *M, Matcher::KindTy Kind) { in FindNodeWithKind()
248 static void FactorNodes(OwningPtr<Matcher> &MatcherPtr) { in FactorNodes()
250 Matcher *N = MatcherPtr.get(); in FactorNodes()
261 SmallVector<Matcher*, 32> OptionsToMatch; in FactorNodes()
265 OwningPtr<Matcher> Child(Scope->takeChild(i)); in FactorNodes()
268 if (Matcher *N = Child.take()) in FactorNodes()
272 SmallVector<Matcher*, 32> NewOptionsToMatch; in FactorNodes()
278 Matcher *Optn = OptionsToMatch[OptionIdx++]; in FactorNodes()
289 SmallVector<Matcher*, 8> EqualMatchers; in FactorNodes()
306 Matcher *ScanMatcher = OptionsToMatch[Scan]; in FactorNodes()
330 Matcher *M2 = FindNodeWithKind(ScanMatcher, Optn->getKind()); in FactorNodes()
334 Matcher *MatcherWithoutM2 = ScanMatcher->unlinkNode(M2); in FactorNodes()
368 Matcher *Shared = Optn; in FactorNodes()
374 Matcher *Tmp = EqualMatchers[i]->takeNext(); in FactorNodes()
422 Matcher::CheckType)); in FactorNodes()
446 SmallVector<std::pair<const SDNodeInfo*, Matcher*>, 8> Cases; in FactorNodes()
461 SmallVector<std::pair<MVT::SimpleValueType, Matcher*>, 8> Cases; in FactorNodes()
465 Matcher::CheckType)); in FactorNodes()
466 Matcher *MatcherWithoutCTM = NewOptionsToMatch[i]->unlinkNode(CTM); in FactorNodes()
473 Matcher *PrevMatcher = Cases[Entry-1].second; in FactorNodes()
480 Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM }; in FactorNodes()
506 Matcher *llvm::OptimizeMatcher(Matcher *TheMatcher, in OptimizeMatcher()
508 OwningPtr<Matcher> MatcherPtr(TheMatcher); in OptimizeMatcher()