diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-04 01:25:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-04 01:25:36 +0000 |
commit | 9752fb10a4ad9a8144740b092d2b4f513897835c (patch) | |
tree | 641a2cee71bf957c8e08b89f776f022d959a0e0c /utils | |
parent | 57bf8a483edf97589c3e6085721e72fc187677a8 (diff) | |
download | external_llvm-9752fb10a4ad9a8144740b092d2b4f513897835c.zip external_llvm-9752fb10a4ad9a8144740b092d2b4f513897835c.tar.gz external_llvm-9752fb10a4ad9a8144740b092d2b4f513897835c.tar.bz2 |
now that complexpatterns are all emitted at the end of the match
sequence, just emit instruction predicates right before them. This
exposes yet more factoring opportunitites, shrinking the X86 table
to 79144 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelMatcherGen.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp index 433da18..783c470 100644 --- a/utils/TableGen/DAGISelMatcherGen.cpp +++ b/utils/TableGen/DAGISelMatcherGen.cpp @@ -471,6 +471,9 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) { if (Variant != 0) return true; } + // Emit the matcher for the pattern structure and types. + EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); + // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). // FIXME: This should get emitted after the match code below to encourage @@ -479,15 +482,11 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) { // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) AddMatcher(new CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); - - // Emit the matcher for the pattern structure and types. - EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); // Now that we've completed the structural type match, emit any ComplexPattern // checks (e.g. addrmode matches). We emit this after the structural match // because they are generally more expensive to evaluate and more difficult to // factor. - // FIXME2: Can the patternpredicatematcher be moved to right before this?? for (unsigned i = 0, e = MatchedComplexPatterns.size(); i != e; ++i) { const TreePatternNode *N = MatchedComplexPatterns[i].first; |