Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 408b811

Browse files
committed
[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
1 parent 14b5530 commit 408b811

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/TableGen/DAGISelMatcherOpt.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ static void FactorNodes(std::unique_ptr<Matcher> &MatcherPtr) {
484484
}
485485

486486
Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM };
487-
Cases[Entry-1].second = new ScopeMatcher(Entries);
487+
std::unique_ptr<Matcher> Case(new ScopeMatcher(Entries));
488+
FactorNodes(Case);
489+
Cases[Entry-1].second = Case.release();
488490
continue;
489491
}
490492

0 commit comments

Comments
 (0)