aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/DAGISelMatcherEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-04 01:23:08 +0000
committerChris Lattner <sabre@nondot.org>2010-03-04 01:23:08 +0000
commit57bf8a483edf97589c3e6085721e72fc187677a8 (patch)
tree6654bdf47178d7f0bf0c3adc02f99c44ef40452e /utils/TableGen/DAGISelMatcherEmitter.cpp
parent8e98d1299dcd9a725e9244457568ff43b153b1a9 (diff)
downloadexternal_llvm-57bf8a483edf97589c3e6085721e72fc187677a8.zip
external_llvm-57bf8a483edf97589c3e6085721e72fc187677a8.tar.gz
external_llvm-57bf8a483edf97589c3e6085721e72fc187677a8.tar.bz2
change the new isel matcher to emit ComplexPattern matches
as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp')
-rw-r--r--utils/TableGen/DAGISelMatcherEmitter.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp
index 1f9e093..63c854b 100644
--- a/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -370,20 +370,22 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
return 2;
case Matcher::CheckComplexPat: {
- const ComplexPattern &Pattern =
- cast<CheckComplexPatMatcher>(N)->getPattern();
- OS << "OPC_CheckComplexPat, " << getComplexPat(Pattern) << ',';
+ const CheckComplexPatMatcher *CCPM = cast<CheckComplexPatMatcher>(N);
+ const ComplexPattern &Pattern = CCPM->getPattern();
+ OS << "OPC_CheckComplexPat, /*CP*/" << getComplexPat(Pattern) << ", /*#*/"
+ << CCPM->getMatchNumber() << ',';
+
if (!OmitComments) {
OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc();
- OS << ':';
+ OS << ":$" << CCPM->getName();
for (unsigned i = 0, e = Pattern.getNumOperands(); i != e; ++i)
- OS << " #" << cast<CheckComplexPatMatcher>(N)->getFirstResult()+i;
+ OS << " #" << CCPM->getFirstResult()+i;
if (Pattern.hasProperty(SDNPHasChain))
OS << " + chain result";
}
OS << '\n';
- return 2;
+ return 3;
}
case Matcher::CheckAndImm: {