summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2016-05-05 06:19:27 +0000
committerCraig Topper <craig.topper@gmail.com>2016-05-05 06:19:27 +0000
commit94753520c6f6b37e0e995ae09e7d18c11f154a34 (patch)
treef3bf2a8dbb5c6a2c29852c42cec4a7175485685d /llvm/utils/TableGen
parentd34bf350b2585a6bbb3d795ce3010b23141e72fe (diff)
downloadbcm5719-llvm-94753520c6f6b37e0e995ae09e7d18c11f154a34.tar.gz
bcm5719-llvm-94753520c6f6b37e0e995ae09e7d18c11f154a34.zip
[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
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/DAGISelMatcherOpt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
index 5c5774066b8..a0211edce09 100644
--- a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -484,7 +484,9 @@ static void FactorNodes(std::unique_ptr<Matcher> &MatcherPtr) {
}
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;
}
OpenPOWER on IntegriCloud