diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:49:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:49:53 +0000 |
commit | c78f2a39945339752a163949a2d7c27f28635d99 (patch) | |
tree | 52a5514af685d5c021e7859f031602936acf290f /utils/TableGen/DAGISelMatcherEmitter.cpp | |
parent | b65c5f2ec347db8342cb7e42d072b0088b74fa73 (diff) | |
download | external_llvm-c78f2a39945339752a163949a2d7c27f28635d99.zip external_llvm-c78f2a39945339752a163949a2d7c27f28635d99.tar.gz external_llvm-c78f2a39945339752a163949a2d7c27f28635d99.tar.bz2 |
enhance the new isel to use SelectNodeTo for most patterns,
even some the old isel didn't. There are several parts of
this that make me feel dirty, but it's no worse than the
old isel. I'll clean up the parts I can do without ripping
out the old one next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcherEmitter.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 942a612..aec1e18 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -416,18 +416,23 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, // Print the result #'s for EmitNode. if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) { - if (EN->getVT(0) != MVT::Flag && EN->getVT(0) != MVT::Other) { + if (unsigned NumResults = EN->getNumNonChainFlagVTs()) { OS.PadToColumn(CommentIndent) << "// Results = "; unsigned First = E->getFirstResultSlot(); - for (unsigned i = 0, e = EN->getNumVTs(); i != e; ++i) { - if (EN->getVT(0) == MVT::Flag || EN->getVT(0) == MVT::Other) - break; + for (unsigned i = 0; i != NumResults; ++i) OS << "#" << First+i << " "; - } } } - OS << '\n'; + + if (const SelectNodeToMatcher *SNT = dyn_cast<SelectNodeToMatcher>(N)) { + OS.PadToColumn(Indent*2) << "// Src: " + << *SNT->getPattern().getSrcPattern() << '\n'; + OS.PadToColumn(Indent*2) << "// Dst: " + << *SNT->getPattern().getDstPattern() << '\n'; + + } + return 6+EN->getNumVTs()+NumOperandBytes; } case Matcher::MarkFlagResults: { |