From: Craig Topper Date: Thu, 5 May 2016 06:19:27 +0000 (+0000) Subject: [TableGen] Make sure to recursively factor any ScopeMatchers created while forming... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=408b811d1ee422aa06beab5b9c488a43dc74ce75;p=llvm [TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268611 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 5c5774066b8..a0211edce09 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/utils/TableGen/DAGISelMatcherOpt.cpp @@ -484,7 +484,9 @@ static void FactorNodes(std::unique_ptr &MatcherPtr) { } Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM }; - Cases[Entry-1].second = new ScopeMatcher(Entries); + std::unique_ptr Case(new ScopeMatcher(Entries)); + FactorNodes(Case); + Cases[Entry-1].second = Case.release(); continue; }