[TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.

llvm-svn: 268611
This commit is contained in:
Craig Topper 2016-05-05 06:19:27 +00:00
parent d34bf350b2
commit 94753520c6
1 changed files with 3 additions and 1 deletions

View File

@ -484,7 +484,9 @@ static void FactorNodes(std::unique_ptr<Matcher> &MatcherPtr) {
} }
Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM }; Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM };
Cases[Entry-1].second = new ScopeMatcher(Entries); std::unique_ptr<Matcher> Case(new ScopeMatcher(Entries));
FactorNodes(Case);
Cases[Entry-1].second = Case.release();
continue; continue;
} }